|
6 | 6 | - 'weekly/f*'
|
7 | 7 |
|
8 | 8 | permissions:
|
9 |
| - contents: read |
| 9 | + contents: write |
| 10 | + actions: write |
| 11 | + id-token: write |
10 | 12 |
|
11 | 13 | jobs:
|
12 | 14 | goreleaser-weekly:
|
@@ -40,29 +42,28 @@ jobs:
|
40 | 42 | - name: Set up Docker Buildx
|
41 | 43 | uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2
|
42 | 44 | # login to docker hub
|
| 45 | + - id: get-secrets |
| 46 | + uses: grafana/shared-workflows/actions/get-vault-secrets@28361cdb22223e5f1e34358c86c20908e7248760 |
| 47 | + with: |
| 48 | + common_secrets: | |
| 49 | + DOCKERHUB_USERNAME=dockerhub:username |
| 50 | + DOCKERHUB_PASSWORD=dockerhub:password |
43 | 51 | - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2
|
44 | 52 | name: Login to Docker Hub
|
45 | 53 | with:
|
46 |
| - username: ${{ secrets.DOCKERHUB_USERNAME }} |
47 |
| - password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 54 | + username: ${{ env.DOCKERHUB_USERNAME }} |
| 55 | + password: ${{ env.DOCKERHUB_PASSWORD }} |
48 | 56 | - uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3
|
49 | 57 | with:
|
50 | 58 | node-version: 20
|
51 | 59 | - run: make frontend/build
|
52 |
| - - name: Get github app token (valid for an hour) |
53 |
| - id: app-goreleaser |
54 |
| - uses: tibdex/github-app-token@32691ba7c9e7063bd457bd8f2a5703138591fa58 # v1 |
55 |
| - with: |
56 |
| - app_id: ${{ secrets.APP_ID }} |
57 |
| - private_key: ${{ secrets.APP_PRIVATE_KEY }} |
58 | 60 | - uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6
|
59 | 61 | with:
|
60 | 62 | # ensure this aligns with the version specified in the /Makefile
|
61 | 63 | version: v2.7.0
|
62 | 64 | args: release --clean --skip=publish --timeout 60m
|
63 | 65 | env:
|
64 |
| - GITHUB_TOKEN: ${{ steps.app-releaser.outputs.token }} |
65 |
| - |
| 66 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
66 | 67 | - name: Push per architecture images and create multi-arch manifest
|
67 | 68 | run: |
|
68 | 69 | set -eu -o pipefail
|
|
88 | 89 |
|
89 | 90 | docker manifest create "grafana/pyroscope:${WEEKLY_IMAGE_TAG}" "${IMAGE_AMMENDS[@]}"
|
90 | 91 | docker manifest push "grafana/pyroscope:${WEEKLY_IMAGE_TAG}"
|
91 |
| - - name: Get github app token (valid for an hour) |
92 |
| - id: app-git-tag |
93 |
| - uses: tibdex/github-app-token@32691ba7c9e7063bd457bd8f2a5703138591fa58 # v1 |
94 |
| - with: |
95 |
| - app_id: ${{ secrets.APP_ID }} |
96 |
| - private_key: ${{ secrets.APP_PRIVATE_KEY }} |
97 | 92 | - name: Push git tag for weekly release
|
98 |
| - run: git push "https://x-access-token:${{ steps.app-git-tag.output.token }}@github.com/grafana/pyroscope.git" "${WEEKLY_IMAGE_TAG}" 2> /dev/null |
| 93 | + run: git push "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/grafana/pyroscope.git" "${WEEKLY_IMAGE_TAG}" 2> /dev/null |
0 commit comments