ci: drop use of set-env in CI scripts
Per https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
Change-Id: I2f1a2c8c843f9995226638ba86ce24c1eafc6f5c
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7561
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index c169636..3342ba0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -29,7 +29,7 @@
run: |-
CUE_VERSION=$(echo ${GITHUB_REF##refs/tags/v})
echo "CUE_VERSION=$CUE_VERSION"
- echo "::set-env name=CUE_VERSION::$(echo $CUE_VERSION)"
+ echo "CUE_VERSION=$(echo $CUE_VERSION)" >> $GITHUB_ENV
- name: Push to Docker Hub
env:
DOCKER_BUILDKIT: 1
diff --git a/internal/ci/workflows.cue b/internal/ci/workflows.cue
index c182896..c98ed15 100644
--- a/internal/ci/workflows.cue
+++ b/internal/ci/workflows.cue
@@ -62,8 +62,8 @@
path: "~/go/pkg/mod"
key: "${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}"
"restore-keys": """
- ${{ runner.os }}-${{ matrix.go-version }}-go-
- """
+ ${{ runner.os }}-${{ matrix.go-version }}-go-
+ """
}
}
@@ -99,11 +99,11 @@
#pullThroughProxy: #step & {
name: "Pull this commit through the proxy on master"
run: """
- v=$(git rev-parse HEAD)
- cd $(mktemp -d)
- go mod init mod.com
- GOPROXY=https://proxy.golang.org go get -d cuelang.org/go@$v
- """
+ v=$(git rev-parse HEAD)
+ cd $(mktemp -d)
+ go mod init mod.com
+ GOPROXY=https://proxy.golang.org go get -d cuelang.org/go@$v
+ """
if: "github.ref == 'refs/heads/master'"
}
@@ -137,9 +137,9 @@
#checkoutRef: #step & {
name: "Checkout ref"
run: """
- git fetch https://cue-review.googlesource.com/cue ${{ github.event.client_payload.ref }}
- git checkout FETCH_HEAD
- """
+ git fetch https://cue-review.googlesource.com/cue ${{ github.event.client_payload.ref }}
+ git checkout FETCH_HEAD
+ """
}
#writeCookiesFile: #step & {
name: "Write the gitcookies file"
@@ -255,7 +255,7 @@
run: """
CUE_VERSION=$(echo ${GITHUB_REF##refs/tags/v})
echo \"CUE_VERSION=$CUE_VERSION\"
- echo \"::set-env name=CUE_VERSION::$(echo $CUE_VERSION)\"
+ echo \"CUE_VERSION=$(echo $CUE_VERSION)\" >> $GITHUB_ENV
"""
}, {
name: "Push to Docker Hub"