build #276
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
workflow_run: | |
workflows: ['ci'] | |
types: | |
- completed | |
jobs: | |
build: | |
if: ${{ github.ref == 'refs/heads/main' && github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Sign into Docker | |
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login ${{ secrets.DOCKER_REGISTRY_URL }} -u ${{ secrets.DOCKER_USERNAME }} --password-stdin | |
- name: Build Docker image and push to Docker Registry | |
run: docker buildx build --push -t ${{ secrets.DOCKER_REGISTRY_URL }}/justinpaulhammond:${GITHUB_SHA} --build-arg PROD=true --platform linux/amd64 . |