Skip to content

Commit 472ea7c

Browse files
mvdanporcuepine
authored andcommitted
update internal/ci/base to switch to cue.gerrithub.io
Signed-off-by: Daniel Martí <[email protected]> Change-Id: I7b4168af0e4a545da6b5290b1eff09831f83521f Dispatch-Trailer: {"type":"trybot","CL":1226128,"patchset":1,"ref":"refs/changes/28/1226128/1","targetBranch":"main"}
1 parent 074d060 commit 472ea7c

File tree

6 files changed

+28
-27
lines changed

6 files changed

+28
-27
lines changed

.github/workflows/push_tip_to_trybot.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
# Code generated internal/ci/ci_tool.cue; DO NOT EDIT.
22

3+
name: Push tip to trybot
4+
"on":
5+
push:
6+
branches:
7+
- main
38
concurrency: push_tip_to_trybot
49
jobs:
510
push:
611
defaults:
712
run:
813
shell: bash --noprofile --norc -euo pipefail {0}
9-
runs-on: ns-linux-amd64
14+
runs-on: namespace-profile-linux-amd64;overrides.cache-tag=cue-dispatch-workflow
1015
if: ${{github.repository == 'cue-labs/oci'}}
1116
steps:
1217
- name: Write netrc file for porcuepine Gerrithub
1318
run: |-
1419
cat <<EOD > ~/.netrc
15-
machine review.gerrithub.io
20+
machine cue.gerrithub.io
1621
login porcuepine
1722
password ${{ secrets.PORCUEPINE_GERRITHUB_PASSWORD }}
1823
EOD
@@ -25,7 +30,7 @@ jobs:
2530
git config user.name porcuepine
2631
git config user.email [email protected]
2732
git config http.https://github.com/.extraheader "AUTHORIZATION: basic $(echo -n porcuepine:${{ secrets.PORCUEPINE_GITHUB_PAT }} | base64)"
28-
git remote add origin https://review.gerrithub.io/a/cue-labs/oci
33+
git remote add origin https://cue.gerrithub.io/a/cue-labs/oci
2934
git remote add trybot https://github.com/cue-labs/oci-trybot
3035
3136
git fetch origin "${{ github.ref }}"
@@ -43,8 +48,3 @@ jobs:
4348
echo "Giving up"
4449
exit 1
4550
fi
46-
name: Push tip to trybot
47-
"on":
48-
push:
49-
branches:
50-
- main

.github/workflows/trybot.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ jobs:
1515
defaults:
1616
run:
1717
shell: bash --noprofile --norc -euo pipefail {0}
18-
runs-on: ns-linux-amd64
18+
runs-on: namespace-profile-linux-amd64
1919
if: |-
2020
(contains(github.event.head_commit.message, '
2121
Dispatch-Trailer: {"type":"trybot"')) || ! (contains(github.event.head_commit.message, '
2222
Dispatch-Trailer: {"type":"'))
2323
steps:
2424
- name: Checkout code
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v5
2626
with:
2727
ref: ${{ github.event.pull_request.head.sha }}
2828
fetch-depth: 0
2929
- name: Reset git directory modification times
3030
run: touch -t 202211302355 $(find * -type d)
3131
- name: Restore git file modification times
32-
uses: chetan/git-restore-mtime-action@075f9bc9d159805603419d50f794bd9f33252ebe
32+
uses: chetan/git-restore-mtime-action@cbf8161ddb4e9b162409104954fb540e8a38c1da
3333
- id: DispatchTrailer
3434
name: Try to extract Dispatch-Trailer
3535
run: |-
@@ -56,14 +56,12 @@ jobs:
5656
echo "github.event.head_commit.message contains Dispatch-Trailer but we are on a protected branch"
5757
false
5858
- name: Install Go
59-
uses: actions/setup-go@v5
59+
uses: actions/setup-go@v6
6060
with:
6161
cache: false
62-
go-version: 1.24.x
62+
go-version: 1.25.x
6363
- name: Set common go env vars
6464
run: |-
65-
go env -w GOTOOLCHAIN=local
66-
6765
case $(go env GOARCH) in
6866
amd64) go env -w GOAMD64=v3 ;; # 2013 and later; makes `go test -race` 15% faster
6967
arm64) go env -w GOARM64=v8.6 ;; # Apple M2 and later
@@ -75,13 +73,12 @@ jobs:
7573
uses: namespacelabs/nscloud-cache-action@v1
7674
with:
7775
cache: go
78-
path: ${{ runner.temp }}/staticcheck
7976
- if: |-
8077
github.repository == 'cue-labs/oci' && (((github.ref == 'refs/heads/main') && (! (contains(github.event.head_commit.message, '
8178
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test'))
8279
run: go env -w GOFLAGS=-count=1
8380
- name: Early git and code sanity checks
84-
run: go run cuelang.org/go/internal/ci/checks@v0.13.2
81+
run: go run cuelang.org/go/internal/ci/checks@v0.14.1
8582
- working-directory: cmd/ocisrv
8683
name: Generate cmd/ocisrv
8784
run: go generate ./...

.github/workflows/trybot_dispatch.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ jobs:
1111
defaults:
1212
run:
1313
shell: bash --noprofile --norc -euo pipefail {0}
14-
runs-on: ns-linux-amd64
14+
runs-on: namespace-profile-linux-amd64;overrides.cache-tag=cue-dispatch-workflow
1515
if: ${{ ((github.ref == 'refs/heads/ci/test') && false) || github.event.client_payload.type == 'trybot' }}
1616
steps:
1717
- name: Write netrc file for porcuepine Gerrithub
1818
run: |-
1919
cat <<EOD > ~/.netrc
20-
machine review.gerrithub.io
20+
machine cue.gerrithub.io
2121
login porcuepine
2222
password ${{ secrets.PORCUEPINE_GERRITHUB_PASSWORD }}
2323
EOD
@@ -40,7 +40,7 @@ jobs:
4040
git config user.name porcuepine
4141
git config user.email [email protected]
4242
git config http.https://github.com/.extraheader "AUTHORIZATION: basic $(echo -n porcuepine:${{ secrets.PORCUEPINE_GITHUB_PAT }} | base64)"
43-
git remote add origin https://review.gerrithub.io/a/cue-labs/oci
43+
git remote add origin https://cue.gerrithub.io/a/cue-labs/oci
4444
4545
git fetch origin ${{ fromJSON(steps.payload.outputs.value).ref }}
4646
git checkout -b local_${{ fromJSON(steps.payload.outputs.value).targetBranch }} FETCH_HEAD
@@ -65,7 +65,10 @@ jobs:
6565
${{ toJSON(fromJSON(steps.payload.outputs.value)) }}
6666
EOD
6767
)"
68-
git log -1 --format=%B | git interpret-trailers --trailer "Dispatch-Trailer: $trailer" | git commit --amend -F -
68+
# --no-divider prevents a "---" line from marking the end of the commit message.
69+
# Here, we know that the input is exactly one commit message,
70+
# so don't do weird things if the commit message has a "---" line.
71+
git log -1 --format=%B | git interpret-trailers --no-divider --trailer "Dispatch-Trailer: $trailer" | git commit --amend -F -
6972
git log -1
7073
7174
success=false
@@ -90,7 +93,7 @@ jobs:
9093
git config user.name porcuepine
9194
git config user.email [email protected]
9295
git config http.https://github.com/.extraheader "AUTHORIZATION: basic $(echo -n porcuepine:${{ secrets.PORCUEPINE_GITHUB_PAT }} | base64)"
93-
git remote add origin https://review.gerrithub.io/a/cue-labs/oci
96+
git remote add origin https://cue.gerrithub.io/a/cue-labs/oci
9497
9598
git fetch origin ${{ github.event.client_payload.ref }}
9699
git checkout -b local_${{ github.event.client_payload.targetBranch }} FETCH_HEAD
@@ -115,7 +118,10 @@ jobs:
115118
${{ toJSON(github.event.client_payload) }}
116119
EOD
117120
)"
118-
git log -1 --format=%B | git interpret-trailers --trailer "Dispatch-Trailer: $trailer" | git commit --amend -F -
121+
# --no-divider prevents a "---" line from marking the end of the commit message.
122+
# Here, we know that the input is exactly one commit message,
123+
# so don't do weird things if the commit message has a "---" line.
124+
git log -1 --format=%B | git interpret-trailers --no-divider --trailer "Dispatch-Trailer: $trailer" | git commit --amend -F -
119125
git log -1
120126
121127
success=false

codereview.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Code generated internal/ci/ci_tool.cue; DO NOT EDIT.
22

33
github: https://github.com/cue-labs/oci
4-
gerrit: https://review.gerrithub.io/a/cue-labs/oci
4+
gerrit: https://cue.gerrithub.io/a/cue-labs/oci

internal/ci/cue.mod/module.cue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ deps: {
88
default: true
99
}
1010
"github.com/cue-lang/tmp/internal/ci@v0": {
11-
v: "v0.0.3"
11+
v: "v0.0.10"
1212
default: true
1313
}
1414
}

internal/ci/repo/repo.cue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ botGitHubUserEmail: "[email protected]"
1616

1717
defaultBranch: "main"
1818

19-
latestGo: "1.24.x"
20-
2119
// modules is a list of Unix paths of go.mod files for go modules in this
2220
// repository
2321
modules: [...string]

0 commit comments

Comments
 (0)