@@ -110,50 +110,35 @@ jobs:
110110 rm -rf traefik-crds
111111 if : steps.tag_exists.outputs.TAG_EXISTS == 'false'
112112
113- # - name: Prepare GPG key for signing
114- # run: |
115- # gpg_dir=.cr-gpg
116- # mkdir "$gpg_dir"
117- # keyring="$gpg_dir/secring.gpg"
118- # echo "${{ secrets.GPG_KEYRING_BASE64 }}" | base64 -d > "$keyring"
119- # passphrase_file="$gpg_dir/passphrase"
120- # echo "${{ secrets.GPG_PASSPHRASE }}" > "$passphrase_file"
121- # echo "CR_PASSPHRASE_FILE=$passphrase_file" >> "$GITHUB_ENV"
122- # echo "CR_KEYRING=$keyring" >> "$GITHUB_ENV"
123- # if: steps.tag_exists.outputs.TAG_EXISTS == 'false'
124-
125- # - name: Publish Helm chart
126- # uses: helm/chart-releaser-action@v1.7.0
127- # with:
128- # charts_dir: .
129- # env:
130- # CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131- # CR_KEY: traefik-helm-sign-test
132- # CR_SIGN: true
133- # if: steps.tag_exists.outputs.TAG_EXISTS == 'false'
134-
135-
136-
137-
138-
139-
140-
141113 - name : Import GPG key
142114 uses : crazy-max/ghaction-import-gpg@v6
143115 id : gpg
144116 with :
145- gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }} # Private key of the GPG key
146- passphrase : ${{ secrets.GPG_PASSPHRASE }} # Passphrase for the key, if required
147- # if: steps.tag_exists.outputs.TAG_EXISTS == 'false'
117+ gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
118+ passphrase : ${{ secrets.GPG_PASSPHRASE }}
119+ if : steps.tag_exists.outputs.TAG_EXISTS == 'false'
148120
149- # Helm requires the legacy GPG format
150- # @link https://helm.sh/docs/topics/provenance/#the-workflow
151- - name : Convert GPG v2 key
121+ - name : Prepare GPG key
152122 run : |
153123 gpg --export > ~/.gnupg/pubring.gpg
154124 gpg --batch --pinentry-mode loopback --yes --passphrase '${{ secrets.GPG_PASSPHRASE }}' --export-secret-key > ~/.gnupg/secring.gpg
155- # if: steps.tag_exists.outputs.TAG_EXISTS == 'false'
156- - name : Chart | Push and sign
125+ echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --dearmor > $HOME/secring.gpg
126+ echo "${{ secrets.GPG_PASSPHRASE }}" > $HOME/passphrase.txt
127+ echo "CR_KEYRING=$HOME/secring.gpg" >> "$GITHUB_ENV"
128+ echo "CR_PASSPHRASE_FILE=$HOME/passphrase.txt" >> "$GITHUB_ENV"
129+ if : steps.tag_exists.outputs.TAG_EXISTS == 'false'
130+
131+ - name : Publish Helm chart
132+ uses : helm/chart-releaser-action@v1.7.0
133+ with :
134+ charts_dir : .
135+ env :
136+ CR_TOKEN : ${{ secrets.GITHUB_TOKEN }}
137+ CR_KEY : ${{ steps.gpg.outputs.name }}
138+ CR_SIGN : true
139+ if : steps.tag_exists.outputs.TAG_EXISTS == 'false'
140+
141+ - name : Publish Helm chart to the ghcr.io registry
157142 uses : appany/helm-oci-chart-releaser@v0.5.0
158143 with :
159144 name : traefik
@@ -166,39 +151,8 @@ jobs:
166151 sign : true
167152 signing_key : ${{ steps.gpg.outputs.name }}
168153 signing_passphrase : ${{ secrets.GPG_PASSPHRASE }}
169- update_dependencies : ' true' # Defaults to false
170- # if: steps.tag_exists.outputs.TAG_EXISTS == 'false'
171-
172- # helm pull ghcr.io/appany/my-chart:0.1.0
173-
174-
175-
176-
177- # - name: Login to GitHub Container Registry
178- # run: echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
179-
180- # - name: Publish Helm chart to the ghcr.io registry
181- # uses: appany/helm-oci-chart-releaser@v0.4.2
182- # with:
183- # name: traefik
184- # repository: bpsoraggi/helm
185- # tag: ${{ steps.chart_version.outputs.CHART_VERSION }}
186- # path: ./traefik
187- # registry: ghcr.io
188- # registry_username: bpsoraggi
189- # registry_password: ${{ secrets.GHCR_TOKEN }}
190- # if: steps.tag_exists.outputs.TAG_EXISTS == 'false'
191-
192- # - name: Install Cosign
193- # uses: sigstore/cosign-installer@v3.9.1
194-
195- # - name: Sign Helm chart
196- # run: |
197- # cosign sign --yes \
198- # -a version="${{ steps.chart_version.outputs.CHART_VERSION }}" \
199- # -a commitSha="$GITHUB_SHA" \
200- # -a buildDate="$(date +%F)" \
201- # ghcr.io/bpsoraggi/helm/traefik:${{ steps.chart_version.outputs.CHART_VERSION }}
154+ update_dependencies : ' true'
155+ if : steps.tag_exists.outputs.TAG_EXISTS == 'false'
202156
203157 traefik-crds :
204158 runs-on : ubuntu-latest
0 commit comments