From 258dc3061881c4048adf836d9156cec27f16852e Mon Sep 17 00:00:00 2001 From: rot1024 Date: Fri, 1 Nov 2024 19:34:12 +0900 Subject: [PATCH] ci: use GITHUB_OUTPUT --- .github/workflows/build_decompressor.yml | 16 ++++++++-------- .github/workflows/build_server.yml | 16 ++++++++-------- .github/workflows/build_web.yml | 16 ++++++++-------- .github/workflows/build_worker.yml | 16 ++++++++-------- .github/workflows/deploy_aws.yml | 2 +- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build_decompressor.yml b/.github/workflows/build_decompressor.yml index efd6188a29..9d2bbc857c 100644 --- a/.github/workflows/build_decompressor.yml +++ b/.github/workflows/build_decompressor.yml @@ -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: @@ -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: diff --git a/.github/workflows/build_server.yml b/.github/workflows/build_server.yml index c2f8850816..11e68482eb 100644 --- a/.github/workflows/build_server.yml +++ b/.github/workflows/build_server.yml @@ -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: @@ -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: diff --git a/.github/workflows/build_web.yml b/.github/workflows/build_web.yml index a073930895..f213826101 100644 --- a/.github/workflows/build_web.yml +++ b/.github/workflows/build_web.yml @@ -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: @@ -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: diff --git a/.github/workflows/build_worker.yml b/.github/workflows/build_worker.yml index 0202794d47..dea1273839 100644 --- a/.github/workflows/build_worker.yml +++ b/.github/workflows/build_worker.yml @@ -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: @@ -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: diff --git a/.github/workflows/deploy_aws.yml b/.github/workflows/deploy_aws.yml index 64c85826e9..ec7b5532eb 100644 --- a/.github/workflows/deploy_aws.yml +++ b/.github/workflows/deploy_aws.yml @@ -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: