build #282
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 | |
- name: Sign into Docker Registry | |
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login ${{ secrets.DOCKER_REGISTRY_URL }} -u ${{ secrets.DOCKER_USERNAME }} --password-stdin | |
- name: Build Docker image | |
run: docker build -t ${{ secrets.DOCKER_REGISTRY_URL }}/justintime50/justinpaulhammond:${GITHUB_SHA} --build-arg PROD=true --platform linux/amd64 . | |
- name: Push image to Registry | |
run: docker push ${{ secrets.DOCKER_REGISTRY_URL }}/justintime50/justinpaulhammond:${GITHUB_SHA} |