diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a45e9abb..501df34d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,15 +35,21 @@ jobs: id: get_version with: cmd: "yq -p toml -oy '.project.version' pyproject.toml" - - if: ${{ inputs.branch == 'master' }} - name: Build Docker From master - run: | - docker buildx build --push --platform "${{ env.platform }}" \ - -t ${{ secrets.DOCKER_USER }}/genpac \ - -t ${{ secrets.DOCKER_USER }}/genpac:${{steps.get_version.outputs.result}} \ - . - - if: ${{ inputs.branch == 'dev' }} - name: Build Docker From dev - run: | - docker buildx build --push --platform "${{ env.platform }}" \ - -t ${{ secrets.DOCKER_USER }}/genpac:dev . + - name: Build and push (master) + uses: docker/build-push-action@v6 + if: ${{ inputs.branch == 'master' }} + with: + push: true + context: . + platforms: ${{ env.platform }} + tags: | + ${{ secrets.DOCKER_USER }}/genpac + ${{ secrets.DOCKER_USER }}/genpac:${{steps.get_version.outputs.result}} + - name: Build and push (dev) + uses: docker/build-push-action@v6 + if: ${{ inputs.branch == 'dev' }} + with: + push: true + context: . + platforms: ${{ env.platform }} + tags: ${{ secrets.DOCKER_USER }}/genpac:dev