mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 06:03:48 +03:00
ci: Update GitHub Actions to avoid set-output
deprecation (#5271)
This commit is contained in:
parent
b166b90083
commit
4e54e48409
2 changed files with 9 additions and 9 deletions
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
@ -64,7 +64,7 @@ jobs:
|
||||||
# go get github.com/axw/gocov/gocov
|
# go get github.com/axw/gocov/gocov
|
||||||
# go get github.com/AlekSi/gocov-xml
|
# go get github.com/AlekSi/gocov-xml
|
||||||
# go get -u github.com/jstemmer/go-junit-report
|
# go get -u github.com/jstemmer/go-junit-report
|
||||||
# echo "::add-path::$(go env GOPATH)/bin"
|
# echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Print Go version and environment
|
- name: Print Go version and environment
|
||||||
id: vars
|
id: vars
|
||||||
|
@ -77,7 +77,7 @@ jobs:
|
||||||
env
|
env
|
||||||
printf "Git version: $(git version)\n\n"
|
printf "Git version: $(git version)\n\n"
|
||||||
# Calculate the short SHA1 hash of the git commit
|
# Calculate the short SHA1 hash of the git commit
|
||||||
echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
|
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Cache the build cache
|
- name: Cache the build cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
@ -123,7 +123,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
# (go test -v -coverprofile=cover-profile.out -race ./... 2>&1) > test-results/test-result.out
|
# (go test -v -coverprofile=cover-profile.out -race ./... 2>&1) > test-results/test-result.out
|
||||||
go test -v -coverprofile="cover-profile.out" -short -race ./...
|
go test -v -coverprofile="cover-profile.out" -short -race ./...
|
||||||
# echo "::set-output name=status::$?"
|
# echo "status=$?" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# Relevant step if we reinvestigate publishing test/coverage reports
|
# Relevant step if we reinvestigate publishing test/coverage reports
|
||||||
# - name: Prepare coverage reports
|
# - name: Prepare coverage reports
|
||||||
|
|
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
|
@ -61,8 +61,8 @@ jobs:
|
||||||
go env
|
go env
|
||||||
printf "\n\nSystem environment:\n\n"
|
printf "\n\nSystem environment:\n\n"
|
||||||
env
|
env
|
||||||
echo "::set-output name=version_tag::${GITHUB_REF/refs\/tags\//}"
|
echo "version_tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
|
||||||
echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
|
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# Add "pip install" CLI tools to PATH
|
# Add "pip install" CLI tools to PATH
|
||||||
echo ~/.local/bin >> $GITHUB_PATH
|
echo ~/.local/bin >> $GITHUB_PATH
|
||||||
|
@ -74,10 +74,10 @@ jobs:
|
||||||
TAG_MINOR=`echo ${TAG#v} | sed -e "s#$SEMVER_RE#\2#"`
|
TAG_MINOR=`echo ${TAG#v} | sed -e "s#$SEMVER_RE#\2#"`
|
||||||
TAG_PATCH=`echo ${TAG#v} | sed -e "s#$SEMVER_RE#\3#"`
|
TAG_PATCH=`echo ${TAG#v} | sed -e "s#$SEMVER_RE#\3#"`
|
||||||
TAG_SPECIAL=`echo ${TAG#v} | sed -e "s#$SEMVER_RE#\4#"`
|
TAG_SPECIAL=`echo ${TAG#v} | sed -e "s#$SEMVER_RE#\4#"`
|
||||||
echo "::set-output name=tag_major::${TAG_MAJOR}"
|
echo "tag_major=${TAG_MAJOR}" >> $GITHUB_OUTPUT
|
||||||
echo "::set-output name=tag_minor::${TAG_MINOR}"
|
echo "tag_minor=${TAG_MINOR}" >> $GITHUB_OUTPUT
|
||||||
echo "::set-output name=tag_patch::${TAG_PATCH}"
|
echo "tag_patch=${TAG_PATCH}" >> $GITHUB_OUTPUT
|
||||||
echo "::set-output name=tag_special::${TAG_SPECIAL}"
|
echo "tag_special=${TAG_SPECIAL}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# Cloudsmith CLI tooling for pushing releases
|
# Cloudsmith CLI tooling for pushing releases
|
||||||
# See https://help.cloudsmith.io/docs/cli
|
# See https://help.cloudsmith.io/docs/cli
|
||||||
|
|
Loading…
Reference in a new issue