Skip to content

Commit a4c5134

Browse files
authored
Merge pull request #5282 from piontec/use-gh-token
change: use the default ephemeral GITHUB_TOKEN instead of the static one
2 parents e5926bc + 2046003 commit a4c5134

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

.github/workflows/release.yaml

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: release
22

33
on:
44
push:
5-
tags: [ 'v*' ]
5+
tags: ["v*"]
66

77
permissions:
88
contents: read
@@ -32,7 +32,7 @@ jobs:
3232
uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25 # v3.4.0
3333
- name: Setup Docker Buildx
3434
id: buildx
35-
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
35+
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
3636
- name: Setup Syft
3737
uses: anchore/sbom-action/download-syft@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 # v0.18.0
3838
- name: Setup Cosign
@@ -44,9 +44,9 @@ jobs:
4444
with:
4545
registry: ghcr.io
4646
username: fluxcdbot
47-
password: ${{ secrets.GHCR_TOKEN }}
47+
password: ${{ secrets.GITHUB_TOKEN }}
4848
- name: Login to Docker Hub
49-
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
49+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
5050
with:
5151
username: fluxcdbot
5252
password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
@@ -82,13 +82,13 @@ jobs:
8282
ARTIFACTS: "${{ steps.run-goreleaser.outputs.artifacts }}"
8383
run: |
8484
set -euo pipefail
85-
85+
8686
hashes=$(echo -E $ARTIFACTS | jq --raw-output '.[] | {name, "digest": (.extra.Digest // .extra.Checksum)} | select(.digest) | {digest} + {name} | join(" ") | sub("^sha256:";"")' | base64 -w0)
8787
echo "hashes=$hashes" >> $GITHUB_OUTPUT
88-
88+
8989
image_url=fluxcd/flux-cli:$GITHUB_REF_NAME
9090
echo "image_url=$image_url" >> $GITHUB_OUTPUT
91-
91+
9292
image_digest=$(docker buildx imagetools inspect ${image_url} --format '{{json .}}' | jq -r .manifest.digest)
9393
echo "image_digest=$image_digest" >> $GITHUB_OUTPUT
9494
@@ -114,7 +114,7 @@ jobs:
114114
with:
115115
registry: ghcr.io
116116
username: fluxcdbot
117-
password: ${{ secrets.GHCR_TOKEN }}
117+
password: ${{ secrets.GITHUB_TOKEN }}
118118
- name: Login to DockerHub
119119
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
120120
with:
@@ -126,7 +126,7 @@ jobs:
126126
flux install --registry=ghcr.io/fluxcd \
127127
--components-extra=image-reflector-controller,image-automation-controller \
128128
--export > ./ghcr.io/flux-system/gotk-components.yaml
129-
129+
130130
cd ./ghcr.io && flux push artifact \
131131
oci://ghcr.io/fluxcd/flux-manifests:${{ steps.prep.outputs.version }} \
132132
--path="./flux-system" \
@@ -138,7 +138,7 @@ jobs:
138138
flux install --registry=docker.io/fluxcd \
139139
--components-extra=image-reflector-controller,image-automation-controller \
140140
--export > ./docker.io/flux-system/gotk-components.yaml
141-
141+
142142
cd ./docker.io && flux push artifact \
143143
oci://docker.io/fluxcd/flux-manifests:${{ steps.prep.outputs.version }} \
144144
--path="./flux-system" \
@@ -197,4 +197,4 @@ jobs:
197197
digest: ${{ needs.release-flux-cli.outputs.image_digest }}
198198
registry-username: fluxcdbot
199199
secrets:
200-
registry-password: ${{ secrets.GHCR_TOKEN }}
200+
registry-password: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)