Skip to content

Commit 8cf68af

Browse files
LauJosefsenclaude
andcommitted
ci: fix APT publish failure and bump actions to latest majors
The 2.1.6 release failed in "Publish to APT": the step installed rclone without refreshing the package index first, so apt resolved the version baked into the runner image (1.60.1+dfsg-3ubuntu0.24.04.5), which Ubuntu has since removed from the pool. The download 404'd and the step exited 100, which also skipped the Homebrew formula update. Add apt-get update before the install. Also bump the actions that were being force-migrated off Node 20: actions/checkout v4 -> v7 actions/setup-go v5 -> v7 actions/upload-artifact v4 -> v7 actions/create-github-app-token v1 -> v3 checkout v6 moved persisted credentials out of .git/config into a separate file referenced by includeIf, so the release job's "git config --unset-all http.https://github.com/.extraheader" no longer removes them and the GITHUB_TOKEN header would have overridden the GitHub App token in the formula push remote URL. Check out with persist-credentials: false instead, which leaves no header to unset. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent d97db50 commit 8cf68af

2 files changed

Lines changed: 19 additions & 13 deletions

File tree

.github/workflows/go.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
permissions:
1414
contents: read
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v7
1717

18-
- uses: actions/setup-go@v5
18+
- uses: actions/setup-go@v7
1919
with:
2020
go-version-file: go.mod
2121
cache: true
@@ -27,7 +27,7 @@ jobs:
2727
run: go test -race -coverprofile=coverage.out ./...
2828

2929
- name: Upload coverage
30-
uses: actions/upload-artifact@v4
30+
uses: actions/upload-artifact@v7
3131
with:
3232
name: coverage
3333
path: coverage.out
@@ -38,9 +38,9 @@ jobs:
3838
permissions:
3939
contents: read
4040
steps:
41-
- uses: actions/checkout@v4
41+
- uses: actions/checkout@v7
4242

43-
- uses: actions/setup-go@v5
43+
- uses: actions/setup-go@v7
4444
with:
4545
go-version-file: go.mod
4646
cache: true
@@ -53,9 +53,9 @@ jobs:
5353
permissions:
5454
contents: read
5555
steps:
56-
- uses: actions/checkout@v4
56+
- uses: actions/checkout@v7
5757

58-
- uses: actions/setup-go@v5
58+
- uses: actions/setup-go@v7
5959
with:
6060
go-version-file: go.mod
6161
cache: true
@@ -70,9 +70,9 @@ jobs:
7070
permissions:
7171
contents: read
7272
steps:
73-
- uses: actions/checkout@v4
73+
- uses: actions/checkout@v7
7474

75-
- uses: actions/setup-go@v5
75+
- uses: actions/setup-go@v7
7676
with:
7777
go-version-file: go.mod
7878
cache: true

.github/workflows/release.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@ jobs:
1313
permissions:
1414
contents: write
1515
steps:
16-
- uses: actions/checkout@v4
16+
# persist-credentials: false keeps checkout from leaving a GITHUB_TOKEN
17+
# Authorization header in the git config. The formula push below
18+
# authenticates as the GitHub App via the remote URL, and a persisted
19+
# header would take precedence over it.
20+
- uses: actions/checkout@v7
21+
with:
22+
persist-credentials: false
1723

18-
- uses: actions/setup-go@v5
24+
- uses: actions/setup-go@v7
1925
with:
2026
go-version-file: go.mod
2127
cache: true
@@ -79,6 +85,7 @@ jobs:
7985
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
8086
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
8187
run: |
88+
sudo apt-get update
8289
sudo apt-get install -y dpkg-dev apt-utils rclone
8390
8491
DESCRIPTION="Developer environment orchestration tool"
@@ -126,7 +133,7 @@ jobs:
126133
- name: Generate app token for formula push
127134
if: github.ref_type == 'tag'
128135
id: app-token
129-
uses: actions/create-github-app-token@v1
136+
uses: actions/create-github-app-token@v3
130137
with:
131138
app-id: ${{ secrets.APP_ID }}
132139
private-key: ${{ secrets.APP_PRIVATE_KEY }}
@@ -145,7 +152,6 @@ jobs:
145152
146153
git config user.email "noc+gitte@cego.dk"
147154
git config user.name "CI"
148-
git config --unset-all http.https://github.com/.extraheader || true
149155
git remote set-url origin "https://x-access-token:${APP_TOKEN}@github.com/cego/gitte"
150156
git fetch origin main
151157
git checkout main

0 commit comments

Comments
 (0)