11# Copyright The Linux Foundation and each contributor to LFX.
22# SPDX-License-Identifier: MIT
33---
4- name : Publish Tagged Release
4+ name : Publish Release
55
66" on " :
77 push :
@@ -10,14 +10,15 @@ name: Publish Tagged Release
1010
1111env :
1212 COSIGN_VERSION : v3.0.2
13- HELM_VERSION : 4.0.1
13+ HELM_VERSION : 4.0.4
14+ DOCKER_REGISTRY : ghcr.io/linuxfoundation/lfx-v1-sync-helper
1415
1516permissions :
1617 contents : read
1718
1819jobs :
19- publish :
20- name : Publish Tagged Release
20+ publish-v1-sync-helper :
21+ name : Publish v1-sync-helper Tagged Release
2122 runs-on : ubuntu-latest
2223 permissions :
2324 contents : read
6263 -t latest \
6364 --sbom spdx
6465
66+ publish-meltano :
67+ name : Publish Meltano Tagged Release
68+ runs-on : ubuntu-latest
69+ needs : [publish-v1-sync-helper]
70+ permissions :
71+ contents : read
72+ packages : write
73+ id-token : write
74+ outputs :
75+ image_name : ${{ steps.build.outputs.image_name }}
76+ digest : ${{ steps.build.outputs.digest }}
77+ app_version : ${{ steps.prepare.outputs.app_version }}
78+ steps :
79+ - name : Checkout repository
80+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
81+
82+ - name : Prepare versions
83+ id : prepare
84+ run : |
85+ set -euo pipefail
86+ APP_VERSION=$(echo ${{ github.ref_name }} | sed 's/v//g')
87+ echo "app_version=$APP_VERSION" >> "$GITHUB_OUTPUT"
88+
89+ - name : Set up Docker Buildx
90+ uses : docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
91+
92+ - name : Login to GitHub Container Registry
93+ uses : docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
94+ with :
95+ registry : ghcr.io
96+ username : ${{ github.actor }}
97+ password : ${{ secrets.GITHUB_TOKEN }}
98+
99+ - name : Extract metadata
100+ id : meta
101+ uses : docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
102+ with :
103+ images : ${{ env.DOCKER_REGISTRY }}/meltano
104+ tags : |
105+ type=ref,event=tag
106+ type=semver,pattern={{version}}
107+ type=raw,value=latest
108+
109+ - name : Build and push Meltano Docker image
110+ id : build
111+ uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
112+ with :
113+ context : .
114+ file : docker/Dockerfile.meltano
115+ platforms : linux/amd64
116+ push : true
117+ tags : ${{ steps.meta.outputs.tags }}
118+ labels : ${{ steps.meta.outputs.labels }}
119+ cache-from : type=gha
120+ cache-to : type=gha,mode=max
121+ provenance : mode=max
122+ sbom : true
123+
124+ - name : Install Cosign
125+ uses : sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
126+ with :
127+ cosign-release : " ${{ env.COSIGN_VERSION }}"
128+
129+ - name : Sign the Meltano container image
130+ env :
131+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
132+ run : |
133+ set -euo pipefail
134+ cosign sign --yes '${{ env.DOCKER_REGISTRY }}/meltano@${{ steps.build.outputs.digest }}'
135+
65136 release-helm-chart :
66- needs : publish
137+ needs :
138+ - publish-v1-sync-helper
139+ - publish-meltano
67140 runs-on : ubuntu-24.04
68141 permissions :
69142 contents : write
@@ -81,10 +154,10 @@ jobs:
81154 uses : >- # main
82155 linuxfoundation/lfx-public-workflows/.github/actions/helm-chart-oci-publisher@c465d6571fa0b8be9d551d902955164ea04a00af
83156 with :
84- name : ${{ needs.publish.outputs.chart_name }}
157+ name : ${{ needs.publish-v1-sync-helper .outputs.chart_name }}
85158 repository : ${{ github.repository }}/chart
86- chart_version : ${{ needs.publish.outputs.chart_version }}
87- app_version : ${{ needs.publish.outputs.app_version }}
159+ chart_version : ${{ needs.publish-v1-sync-helper .outputs.chart_version }}
160+ app_version : ${{ needs.publish-v1-sync-helper .outputs.app_version }}
88161 helm_version : " ${{ env.HELM_VERSION }}"
89162 registry : ghcr.io
90163 registry_username : ${{ github.actor }}
96169 cosign-release : " ${{ env.COSIGN_VERSION }}"
97170
98171 - name : Login to GitHub
99- uses : docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4 .0
172+ uses : docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6 .0
100173 with :
101174 registry : ghcr.io
102175 username : ${{ github.actor }}
@@ -126,3 +199,21 @@ jobs:
126199 registry-username : ${{ github.actor }}
127200 secrets :
128201 registry-password : ${{ secrets.GITHUB_TOKEN }}
202+
203+ create-meltano-provenance :
204+ needs :
205+ - publish-meltano
206+ permissions :
207+ actions : read
208+ id-token : write
209+ packages : write
210+ # Note, this action *cannot* be pinned to a ref: see the project's
211+ # explanation at "Referencing SLSA builders and generators" in their
212+ # README.
213+ uses :
slsa-framework/slsa-github-generator/.github/workflows/[email protected] 214+ with :
215+ image : ${{ needs.publish-meltano.outputs.image_name }}
216+ digest : ${{ needs.publish-meltano.outputs.digest }}
217+ registry-username : ${{ github.actor }}
218+ secrets :
219+ registry-password : ${{ secrets.GITHUB_TOKEN }}
0 commit comments