-
Notifications
You must be signed in to change notification settings - Fork 64
43 lines (37 loc) · 1.17 KB
/
build-saml-tag.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build Tag
on:
workflow_run:
workflows: ["Test"]
types:
- completed
jobs:
build-saml-tag:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && startsWith(github.event.workflow_run.head_commit.message, 'tag:') }}
steps:
- uses: actions/checkout@v2
- name: Checkout another repository
uses: actions/checkout@v2
with:
repository: salopensource/sal-saml
path: saml
- 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: saml
push: true
file: saml/Dockerfile.pristine
tags: ghcr.io/salopensource/sal-saml:${{ github.ref_name }}
- 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