Trigger Docker flow from Release flow
This commit is contained in:
parent
6674fccb6a
commit
b22363a87f
5
.github/workflows/create_release.yml
vendored
5
.github/workflows/create_release.yml
vendored
@ -27,3 +27,8 @@ jobs:
|
||||
name: ${{ steps.tag_version.outputs.new_tag }}
|
||||
body: ${{ steps.tag_version.outputs.changelog }}
|
||||
generateReleaseNotes: true
|
||||
|
||||
- name: Create Docker Image
|
||||
uses: luketainton/roboluke-tasks/.github/workflows/docker_publish.yml@main
|
||||
with:
|
||||
release: ${{ steps.tag_version.outputs.new_tag }}
|
||||
|
14
.github/workflows/docker_publish.yml
vendored
14
.github/workflows/docker_publish.yml
vendored
@ -1,9 +1,11 @@
|
||||
name: Publish Docker Image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
inputs:
|
||||
release:
|
||||
types: [published, created]
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
@ -18,7 +20,7 @@ jobs:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.release.name }}
|
||||
ref: ${{ inputs.release }}
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
||||
@ -33,7 +35,7 @@ jobs:
|
||||
with:
|
||||
images: |
|
||||
ghcr.io/${{ github.repository }}:latest
|
||||
ghcr.io/${{ github.repository }}:${{ github.event.release.name }}
|
||||
ghcr.io/${{ github.repository }}:${{ inputs.release }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
id: push
|
||||
@ -43,12 +45,12 @@ jobs:
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository }}:latest
|
||||
ghcr.io/${{ github.repository }}:${{ github.event.release.name }}
|
||||
ghcr.io/${{ github.repository }}:${{ inputs.release }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
- name: Generate artifact attestation
|
||||
uses: actions/attest-build-provenance@v1
|
||||
with:
|
||||
subject-name: ghcr.io/${{ github.repository }}:${{ github.event.release.name }}
|
||||
subject-name: ghcr.io/${{ github.repository }}:${{ inputs.release }}
|
||||
subject-digest: ${{ steps.push.outputs.digest }}
|
||||
push-to-registry: true
|
||||
|
Loading…
Reference in New Issue
Block a user