Skip to content

Commit

Permalink
update to use latest published githubactions schema
Browse files Browse the repository at this point in the history
The `#Step` and `#Job` definitions have now been fixed.
Update the `module.cue` file to use the new version of the module.

Fixes #3497.

Signed-off-by: Roger Peppe <[email protected]>
Change-Id: Ia57a9599cef5f37eac7bbe21de0ba8a690702e34
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1203612
Reviewed-by: Daniel Martí <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
  • Loading branch information
rogpeppe committed Nov 5, 2024
1 parent 8ff9db9 commit 93c1d7e
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 58 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/evict_caches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
run: touch -t 202211302355 $(find * -type d)
- name: Restore git file modification times
uses: chetan/git-restore-mtime-action@075f9bc9d159805603419d50f794bd9f33252ebe
- name: Try to extract Dispatch-Trailer
id: DispatchTrailer
- id: DispatchTrailer
name: Try to extract Dispatch-Trailer
run: |-
x="$(git log -1 --pretty='%(trailers:key=Dispatch-Trailer,valueonly)')"
if [[ "$x" == "" ]]
Expand All @@ -38,11 +38,11 @@ jobs:
echo "value<<EOD" >> $GITHUB_OUTPUT
echo "$x" >> $GITHUB_OUTPUT
echo "EOD" >> $GITHUB_OUTPUT
- name: Check we don't have Dispatch-Trailer on a protected branch
if: |-
- if: |-
((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) && (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"'))
name: Check we don't have Dispatch-Trailer on a protected branch
run: |-
echo "github.event.head_commit.message contains Dispatch-Trailer but we are on a protected branch"
false
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
run: touch -t 202211302355 $(find * -type d)
- name: Restore git file modification times
uses: chetan/git-restore-mtime-action@075f9bc9d159805603419d50f794bd9f33252ebe
- name: Try to extract Dispatch-Trailer
id: DispatchTrailer
- id: DispatchTrailer
name: Try to extract Dispatch-Trailer
run: |-
x="$(git log -1 --pretty='%(trailers:key=Dispatch-Trailer,valueonly)')"
if [[ "$x" == "" ]]
Expand All @@ -45,11 +45,11 @@ jobs:
echo "value<<EOD" >> $GITHUB_OUTPUT
echo "$x" >> $GITHUB_OUTPUT
echo "EOD" >> $GITHUB_OUTPUT
- name: Check we don't have Dispatch-Trailer on a protected branch
if: |-
- if: |-
((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) && (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"'))
name: Check we don't have Dispatch-Trailer on a protected branch
run: |-
echo "github.event.head_commit.message contains Dispatch-Trailer but we are on a protected branch"
false
Expand Down Expand Up @@ -82,17 +82,17 @@ jobs:
install-only: true
version: v2.3.2
- name: Run GoReleaser with CUE
env:
CUE_LOGINS: ${{ secrets.NOTCUECKOO_CUE_LOGINS }}
GITHUB_TOKEN: ${{ secrets.CUECKOO_GITHUB_PAT }}
run: |-
export CUE_CONFIG_DIR=$(mktemp -d)
echo "$CUE_LOGINS" > $CUE_CONFIG_DIR/logins.json
cue cmd release
working-directory: ./internal/ci/goreleaser
- name: Re-test cuelang.org
if: startsWith(github.ref, 'refs/tags/v')
env:
CUE_LOGINS: ${{ secrets.NOTCUECKOO_CUE_LOGINS }}
GITHUB_TOKEN: ${{ secrets.CUECKOO_GITHUB_PAT }}
- if: startsWith(github.ref, 'refs/tags/v')
name: Re-test cuelang.org
run: 'curl -s -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.CUECKOO_GITHUB_PAT }}" -H "X-GitHub-Api-Version: 2022-11-28" --fail --request POST --data-binary "{\"event_type\":\"Re-test post release of ${GITHUB_REF##refs/tags/}\"}" https://api.github.com/repos/cue-lang/cuelang.org/dispatches'
- name: Trigger unity build
if: startsWith(github.ref, 'refs/tags/v')
- if: startsWith(github.ref, 'refs/tags/v')
name: Trigger unity build
run: 'curl -s -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.PORCUEPINE_GITHUB_PAT }}" -H "X-GitHub-Api-Version: 2022-11-28" --fail --request POST --data-binary "{\"event_type\":\"Check against CUE ${GITHUB_REF##refs/tags/}\",\"client_payload\":{\"type\":\"unity\",\"payload\":{\"versions\":\"\\\"${GITHUB_REF##refs/tags/}\\\"\"}}}" https://api.github.com/repos/cue-unity/unity-private/dispatches'
72 changes: 36 additions & 36 deletions .github/workflows/trybot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
run: touch -t 202211302355 $(find * -type d)
- name: Restore git file modification times
uses: chetan/git-restore-mtime-action@075f9bc9d159805603419d50f794bd9f33252ebe
- name: Try to extract Dispatch-Trailer
id: DispatchTrailer
- id: DispatchTrailer
name: Try to extract Dispatch-Trailer
run: |-
x="$(git log -1 --pretty='%(trailers:key=Dispatch-Trailer,valueonly)')"
if [[ "$x" == "" ]]
Expand All @@ -58,11 +58,11 @@ jobs:
echo "value<<EOD" >> $GITHUB_OUTPUT
echo "$x" >> $GITHUB_OUTPUT
echo "EOD" >> $GITHUB_OUTPUT
- name: Check we don't have Dispatch-Trailer on a protected branch
if: |-
- if: |-
((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) && (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"'))
name: Check we don't have Dispatch-Trailer on a protected branch
run: |-
echo "github.event.head_commit.message contains Dispatch-Trailer but we are on a protected branch"
false
Expand All @@ -77,75 +77,75 @@ jobs:
# Dump env for good measure
go env
- name: Get go mod cache directory
id: go-mod-cache-dir
- id: go-mod-cache-dir
name: Get go mod cache directory
run: echo "dir=$(go env GOMODCACHE)" >> ${GITHUB_OUTPUT}
- name: Get go build/test cache directory
id: go-cache-dir
- id: go-cache-dir
name: Get go build/test cache directory
run: echo "dir=$(go env GOCACHE)" >> ${GITHUB_OUTPUT}
- with:
- if: |-
(((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test'))
uses: actions/cache@v4
with:
path: |-
${{ steps.go-mod-cache-dir.outputs.dir }}/cache/download
${{ steps.go-cache-dir.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.go-version }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-${{ matrix.go-version }}
if: |-
(((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
- if: |-
! (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test'))
uses: actions/cache@v4
- with:
uses: actions/cache/restore@v4
with:
path: |-
${{ steps.go-mod-cache-dir.outputs.dir }}/cache/download
${{ steps.go-cache-dir.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.go-version }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-${{ matrix.go-version }}
uses: actions/cache/restore@v4
if: |-
! (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test'))
- if: |-
github.repository == 'cue-lang/cue' && (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) || github.ref == 'refs/heads/ci/test')
run: go clean -testcache
- name: Early git and code sanity checks
if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
name: Early git and code sanity checks
run: go run ./internal/ci/checks
- name: Test
if: |-
- if: |-
((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) || !(matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
name: Test
run: go test ./...
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
name: Test with -race
run: go test -race ./...
env:
GORACE: atexit_sleep_ms=10
run: go test -race ./...
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
name: Test on 32 bits
run: go test -short ./...
env:
GOARCH: "386"
run: go test -short ./...
- name: Test with -tags=cuewasm
run: go test -tags cuewasm ./cmd/cue/cmd ./cue/interpreter/wasm
- name: gcloud auth for end-to-end tests
id: auth
uses: google-github-actions/auth@v2
if: |-
github.repository == 'cue-lang/cue' && (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.E2E_GCLOUD_KEY }}
- name: gcloud setup for end-to-end tests
if: |-
- if: |-
github.repository == 'cue-lang/cue' && (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
name: gcloud setup for end-to-end tests
uses: google-github-actions/setup-gcloud@v2
- name: End-to-end test
env:
CUE_TEST_LOGINS: ${{ secrets.E2E_PORCUEPINE_CUE_LOGINS }}
if: |-
- if: |-
github.repository == 'cue-lang/cue' && (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
name: End-to-end test
env:
CUE_TEST_LOGINS: ${{ secrets.E2E_PORCUEPINE_CUE_LOGINS }}
run: |-
cd internal/_e2e
go test -race
Expand All @@ -171,14 +171,14 @@ jobs:
echo "Did you forget about refs/attic branches? https://github.com/cue-lang/cue/wiki/Notes-for-project-maintainers"
exit 1
fi
- name: Generate
env:
CUE_LOGINS: ${{ secrets.NOTCUECKOO_CUE_LOGINS }}
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
name: Generate
run: |-
export CUE_CONFIG_DIR=$(mktemp -d)
echo "$CUE_LOGINS" > $CUE_CONFIG_DIR/logins.json
go generate ./...
if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
- name: Check that git is clean at the end of the job
if: always()
env:
CUE_LOGINS: ${{ secrets.NOTCUECKOO_CUE_LOGINS }}
- if: always()
name: Check that git is clean at the end of the job
run: test -z "$(git status --porcelain)" || (git status; git diff; false)
12 changes: 6 additions & 6 deletions .github/workflows/trybot_dispatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ jobs:
password ${{ secrets.CUECKOO_GERRITHUB_PASSWORD }}
EOD
chmod 600 ~/.netrc
- name: Write fake payload
id: payload
- id: payload
if: github.repository == 'cue-lang/cue' && (github.ref == 'refs/heads/ci/test')
name: Write fake payload
run: |-
cat <<EOD >> $GITHUB_OUTPUT
value<<DOE
null
DOE
EOD
- name: Trigger TryBot (fake data)
if: github.event.client_payload.type != 'trybot'
- if: github.event.client_payload.type != 'trybot'
name: Trigger TryBot (fake data)
run: |-
mkdir tmpgit
cd tmpgit
Expand Down Expand Up @@ -81,8 +81,8 @@ jobs:
echo "Giving up"
exit 1
fi
- name: Trigger TryBot (repository_dispatch payload)
if: github.event.client_payload.type == 'trybot'
- if: github.event.client_payload.type == 'trybot'
name: Trigger TryBot (repository_dispatch payload)
run: |-
mkdir tmpgit
cd tmpgit
Expand Down
2 changes: 1 addition & 1 deletion cue.mod/module.cue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ language: {
}
deps: {
"github.com/cue-tmp/jsonschema-pub/exp1/githubactions@v0": {
v: "v0.3.0"
v: "v0.4.0"
default: true
}
}

0 comments on commit 93c1d7e

Please sign in to comment.