Skip to content

Build Latest

Build Latest #4

Workflow file for this run

name: Build Latest
on:
workflow_run:
workflows: ["Test"]
types:
- completed
jobs:
build-latest:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }}
steps:
- uses: actions/checkout@v2
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build and Push Docker image
id: push
uses: docker/[email protected]
with:
context: .
push: true
tags: ghcr.io/salopensource/sal:latest
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true