Skip to content

build

build #282

Workflow file for this run

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}