diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index db5865c8e..f24450f45 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,9 +2,9 @@ name: Docker Build and Push # Build & Push builds the simapp docker image on every push to master # and pushes the image to https://hub.docker.com/u/provenanceio on: - # Uncomment this trigger if you'd like to test this workflow during active development. - # This trigger is configured to not push any images to Docker Hub. pull_request: + paths: + - .github/workflow/docker.yml push: branches: - main @@ -39,7 +39,7 @@ jobs: prefix=heighliner-,onlatest=true tags: | type=edge - type=ref,enable=${{ github.event_name == 'pull_request' }},event=pr + type=ref,event=pr type=ref,event=tag - uses: docker/login-action@v3 @@ -47,7 +47,6 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - # - uses: strangelove-ventures/heighliner-build-action@v1.0.1 - uses: strangelove-ventures/heighliner-build-action@main with: heighliner-tag: v1.5.5 @@ -61,42 +60,42 @@ jobs: additional-args: "--alpine-version 3.18" skip: ${{ github.event_name == 'pull_request' }} - # docker: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 + docker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 - # - uses: actions/setup-go@v5 - # with: - # go-version: '1.21' + - uses: actions/setup-go@v5 + with: + go-version: '1.21' - # - run: go mod vendor + - run: go mod vendor - # - uses: docker/setup-buildx-action@v3 + - uses: docker/setup-buildx-action@v3 - # - uses: docker/setup-qemu-action@v2 + - uses: docker/setup-qemu-action@v2 - # - uses: docker/metadata-action@v5 - # id: meta - # with: - # images: ${{ env.DOCKER_IMAGE }} - # tags: | - # type=edge - # type=ref,enable=${{ github.event_name == 'pull_request' }},event=branch - # type=ref,event=tag + - uses: docker/metadata-action@v5 + id: meta + with: + images: ${{ env.DOCKER_IMAGE }} + tags: | + type=edge + type=ref,event=pr + type=ref,event=tag - # - uses: docker/login-action@v3 - # with: - # username: ${{ secrets.DOCKERHUB_USERNAME }} - # password: ${{ secrets.DOCKERHUB_TOKEN }} + - uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - # - uses: docker/build-push-action@v5 - # with: - # context: . - # target: run - # build-args: | - # VERSION=${{ steps.meta.outputs.version }} - # platforms: linux/amd64,linux/arm64 - # file: docker/blockchain/Dockerfile - # push: ${{ github.event_name != 'pull_request' }} - # tags: ${{ steps.meta.outputs.tags }} + - uses: docker/build-push-action@v5 + with: + context: . + target: run + build-args: | + VERSION=${{ steps.meta.outputs.version }} + platforms: linux/amd64,linux/arm64 + file: docker/blockchain/Dockerfile + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }}