Skip to content

Commit

Permalink
ci: use GITHUB_OUTPUT
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Nov 1, 2024
1 parent 3466031 commit 258dc30
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 33 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build_decompressor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ jobs:
env:
BRANCH: ${{ github.event.workflow_run.head_branch }}
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
echo "sha_short=$(git rev-parse --short HEAD))" >> "$GITHUB_OUTPUT"
if [[ "$BRANCH" = "release" ]]; then
TAG=$(git tag --points-at HEAD)
if [[ ! -z "$TAG" ]]; then
echo "::set-output name=new_tag::$TAG"
echo "::set-output name=new_tag_short::${TAG#v}"
echo "new_tag=$TAG" >> "$GITHUB_OUTPUT"
echo "new_tag_short=${TAG#v}" >> "$GITHUB_OUTPUT"
else
echo "::set-output name=name::rc"
echo "name=rc" >> "$GITHUB_OUTPUT"
fi
else
echo "::set-output name=name::nightly"
echo "name=nightly" >> "$GITHUB_OUTPUT"
fi
- name: Show info
env:
Expand Down Expand Up @@ -90,9 +90,9 @@ jobs:
VERSION=$SHA
TAGS=$IMAGE_NAME:$NAME
fi
echo "::set-output name=platforms::$PLATFORMS"
echo "::set-output name=version::$VERSION"
echo "::set-output name=tags::$TAGS"
echo "platforms=$PLATFORMS" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
- name: Build and push docker image
uses: docker/build-push-action@v6
with:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ jobs:
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
echo "sha_short=$(git rev-parse --short HEAD))" >> "$GITHUB_OUTPUT"
if [[ "$BRANCH" = "release" ]]; then
TAG=$(git tag --points-at HEAD)
if [[ ! -z "$TAG" ]]; then
echo "::set-output name=new_tag::$TAG"
echo "::set-output name=new_tag_short::${TAG#v}"
echo "new_tag=$TAG" >> "$GITHUB_OUTPUT"
echo "new_tag_short=${TAG#v}" >> "$GITHUB_OUTPUT"
else
echo "::set-output name=name::rc"
echo "name=rc" >> "$GITHUB_OUTPUT"
fi
else
echo "::set-output name=name::nightly"
echo "name=nightly" >> "$GITHUB_OUTPUT"
fi
- name: Show info
env:
Expand Down Expand Up @@ -86,9 +86,9 @@ jobs:
VERSION=$SHA
TAGS=$IMAGE_NAME:$NAME
fi
echo "::set-output name=platforms::$PLATFORMS"
echo "::set-output name=version::$VERSION"
echo "::set-output name=tags::$TAGS"
ehoc "platforms=$PLATFORMS" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
- name: Fetch reearth-cms-web
uses: dawidd6/action-download-artifact@v6
with:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ jobs:
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
echo "sha_short=$(git rev-parse --short HEAD))" >> "$GITHUB_OUTPUT"
if [[ "$BRANCH" = "release" ]]; then
TAG=$(git tag --points-at HEAD)
if [[ ! -z "$TAG" ]]; then
echo "new_tag=$TAG" >> $GITHUB_ENV
echo "new_tag_short=${TAG#v}" >> $GITHUB_ENV
echo "new_tag=$TAG" >> "$GITHUB_OUTPUT"
echo "new_tag_short=${TAG#v}" >> "$GITHUB_OUTPUT"
else
echo "name=rc" >> $GITHUB_ENV
echo "name=rc" >> "$GITHUB_OUTPUT"
fi
else
echo "name=nightly" >> $GITHUB_ENV
echo "name=nightly" >> "$GITHUB_OUTPUT"
fi
- name: Show info
env:
Expand Down Expand Up @@ -86,9 +86,9 @@ jobs:
VERSION=$SHA
TAGS=$IMAGE_NAME:$NAME
fi
echo "::set-output name=platforms::$PLATFORMS"
echo "::set-output name=version::$VERSION"
echo "::set-output name=tags::$TAGS"
ehoc "platforms=$PLATFORMS" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
- name: Build and push docker image
uses: docker/build-push-action@v6
with:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build_worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ jobs:
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
echo "sha_short=$(git rev-parse --short HEAD))" >> "$GITHUB_OUTPUT"
if [[ "$BRANCH" = "release" ]]; then
TAG=$(git tag --points-at HEAD)
if [[ ! -z "$TAG" ]]; then
echo "::set-output name=new_tag::$TAG"
echo "::set-output name=new_tag_short::${TAG#v}"
echo "new_tag=$TAG" >> "$GITHUB_OUTPUT"
echo "new_tag_short=${TAG#v}" >> "$GITHUB_OUTPUT"
else
echo "::set-output name=name::rc"
echo "name=rc" >> "$GITHUB_OUTPUT"
fi
else
echo "::set-output name=name::nightly"
echo "name=nightly" >> "$GITHUB_OUTPUT"
fi
- name: Show info
env:
Expand Down Expand Up @@ -86,9 +86,9 @@ jobs:
VERSION=$SHA
TAGS=$IMAGE_NAME:$NAME
fi
echo "::set-output name=platforms::$PLATFORMS"
echo "::set-output name=version::$VERSION"
echo "::set-output name=tags::$TAGS"
ehoc "platforms=$PLATFORMS" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
- name: Build and push docker image
uses: docker/build-push-action@v6
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v4
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
id: yarn-cache
with:
Expand Down

0 comments on commit 258dc30

Please sign in to comment.