diff --git a/.github/workflows/promote-env.yml b/.github/workflows/promote-env.yml index 56e0473..9a0e0e0 100644 --- a/.github/workflows/promote-env.yml +++ b/.github/workflows/promote-env.yml @@ -16,22 +16,19 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: build container - run: | - docker build \ - --tag ghcr.io/${{ github.repository_owner }}/${{ env.WORKLOAD_NAME }}:test \ - --platform linux/amd64,linux/arm64 \ - app/ - name: login to ghcr run: | echo ${{ secrets.GITHUB_TOKEN }} | docker login \ ghcr.io \ -u $ \ --password-stdin - - name: push container in ghcr - run: | - docker push \ - ghcr.io/${{ github.repository_owner }}/${{ env.WORKLOAD_NAME }}:test + - name: Build and push + uses: docker/build-push-action@v6 + with: + file: app/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: "ghcr.io/${{ github.repository_owner }}/${{ env.WORKLOAD_NAME }}:test" - run: | docker images docker inspect ghcr.io/${{ github.repository_owner }}/${{ env.WORKLOAD_NAME }}:test