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