diff options
author | Egor Tensin <egor@tensin.name> | 2024-12-19 11:20:29 +0100 |
---|---|---|
committer | Egor Tensin <egor@tensin.name> | 2024-12-19 11:25:43 +0100 |
commit | 5e43190426e4efb5310e80ce0f8151921e4577e2 (patch) | |
tree | d407971ff6d3779c81c20277525b9e0feb360435 /.github | |
parent | Makefile: remove docker-compose shortcuts (diff) | |
download | fr24feed-5e43190426e4efb5310e80ce0f8151921e4577e2.tar.gz fr24feed-5e43190426e4efb5310e80ce0f8151921e4577e2.zip |
workflows/ci: remove unnecessary jobs
Meh, why was I building this three times instead of one?
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yml | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8d6812..1fdc0a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,35 +6,12 @@ on: workflow_dispatch: jobs: - compose: - runs-on: ubuntu-latest - name: Build / docker-compose - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build w/ docker-compose - run: make compose/build - - buildx: - runs-on: ubuntu-latest - name: Build / docker buildx - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build w/ docker buildx - run: | - make buildx/create - make buildx/build - make buildx/rm - publish: - needs: [compose, buildx] strategy: matrix: project: [dump1090, fr24feed] runs-on: ubuntu-latest name: 'Publish / ${{ matrix.project }}' - if: github.ref == 'refs/heads/master' steps: - name: Checkout uses: actions/checkout@v4 @@ -47,11 +24,20 @@ jobs: with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' + - id: platforms + name: Which platforms? + # Building for all platforms for every commit is too time-consuming. + run: | + if [ '${{ github.ref }}' = 'refs/heads/master' ]; then + echo 'platforms=i386,amd64,arm64' >> "$GITHUB_OUTPUT" + else + echo 'platforms=amd64' >> "$GITHUB_OUTPUT" + fi - name: 'Publish ${{ matrix.project }}' uses: docker/build-push-action@v5 with: context: '${{ matrix.project }}' file: '${{ matrix.project }}/Dockerfile' - platforms: i386,amd64,arm64 - push: true + platforms: '${{ steps.platforms.outputs.platforms }}' + push: ${{ github.ref == 'refs/heads/master' }} tags: '${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.project }}:latest' |