Browse Source

CI: Fix GitHub Actions warnings for `::set-output` (#2897)

> The `set-output` command is deprecated and will be disabled soon.
> Please upgrade to using Environment Files.
> For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Jochen Schalanda 2 years ago
parent
commit
7944608218

+ 2 - 2
.github/workflows/branch-deploy.yml

@@ -14,7 +14,7 @@ jobs:
         id: extract_branch
         id: extract_branch
         run: |
         run: |
           tag='pr${{ github.event.pull_request.number }}'
           tag='pr${{ github.event.pull_request.number }}'
-          echo ::set-output name=tag::${tag}
+          echo "tag=${tag}" >> $GITHUB_OUTPUT
         env:
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
       - name: Set up JDK
       - name: Set up JDK
@@ -29,7 +29,7 @@ jobs:
           ./mvnw -B -ntp versions:set -DnewVersion=$GITHUB_SHA
           ./mvnw -B -ntp versions:set -DnewVersion=$GITHUB_SHA
           ./mvnw -B -V -ntp clean package -Pprod -DskipTests
           ./mvnw -B -V -ntp clean package -Pprod -DskipTests
           export VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
           export VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
-          echo "::set-output name=version::${VERSION}"
+          echo "version=${VERSION}" >> $GITHUB_OUTPUT
       - name: Set up QEMU
       - name: Set up QEMU
         uses: docker/setup-qemu-action@v2
         uses: docker/setup-qemu-action@v2
       - name: Set up Docker Buildx
       - name: Set up Docker Buildx

+ 2 - 2
.github/workflows/build-public-image.yml

@@ -13,7 +13,7 @@ jobs:
         id: extract_branch
         id: extract_branch
         run: |
         run: |
           tag='${{ github.event.pull_request.number }}'
           tag='${{ github.event.pull_request.number }}'
-          echo ::set-output name=tag::${tag}
+          echo "tag=${tag}" >> $GITHUB_OUTPUT
       - name: Set up JDK
       - name: Set up JDK
         uses: actions/setup-java@v3
         uses: actions/setup-java@v3
         with:
         with:
@@ -26,7 +26,7 @@ jobs:
           ./mvnw -B -ntp versions:set -DnewVersion=$GITHUB_SHA
           ./mvnw -B -ntp versions:set -DnewVersion=$GITHUB_SHA
           ./mvnw -B -V -ntp clean package -Pprod -DskipTests
           ./mvnw -B -V -ntp clean package -Pprod -DskipTests
           export VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
           export VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
-          echo "::set-output name=version::${VERSION}"
+          echo "version=${VERSION}" >> $GITHUB_OUTPUT
       - name: Set up QEMU
       - name: Set up QEMU
         uses: docker/setup-qemu-action@v2
         uses: docker/setup-qemu-action@v2
       - name: Set up Docker Buildx
       - name: Set up Docker Buildx

+ 1 - 1
.github/workflows/cve.yaml

@@ -23,7 +23,7 @@ jobs:
           ./mvnw -B -ntp versions:set -DnewVersion=$GITHUB_SHA
           ./mvnw -B -ntp versions:set -DnewVersion=$GITHUB_SHA
           ./mvnw -B -V -ntp clean package -DskipTests
           ./mvnw -B -V -ntp clean package -DskipTests
           export VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
           export VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
-          echo "::set-output name=version::${VERSION}"
+          echo "version=${VERSION}" >> $GITHUB_OUTPUT
 
 
       - name: Set up QEMU
       - name: Set up QEMU
         uses: docker/setup-qemu-action@v2
         uses: docker/setup-qemu-action@v2

+ 1 - 1
.github/workflows/delete-public-image.yml

@@ -13,7 +13,7 @@ jobs:
         run: |
         run: |
           echo
           echo
           tag='${{ github.event.pull_request.number }}'
           tag='${{ github.event.pull_request.number }}'
-          echo ::set-output name=tag::${tag}
+          echo "tag=${tag}" >> $GITHUB_OUTPUT
       - name: Configure AWS credentials for Kafka-UI account
       - name: Configure AWS credentials for Kafka-UI account
         uses: aws-actions/configure-aws-credentials@v1
         uses: aws-actions/configure-aws-credentials@v1
         with:
         with:

+ 1 - 1
.github/workflows/master.yaml

@@ -23,7 +23,7 @@ jobs:
           ./mvnw -B -ntp versions:set -DnewVersion=$GITHUB_SHA
           ./mvnw -B -ntp versions:set -DnewVersion=$GITHUB_SHA
           ./mvnw -V -B -ntp clean package -Pprod -DskipTests
           ./mvnw -V -B -ntp clean package -Pprod -DskipTests
           export VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
           export VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
-          echo "::set-output name=version::${VERSION}"
+          echo "version=${VERSION}" >> $GITHUB_OUTPUT
 #################
 #################
 #               #
 #               #
 # Docker images #
 # Docker images #

+ 1 - 1
.github/workflows/release.yaml

@@ -30,7 +30,7 @@ jobs:
           ./mvnw -B -ntp versions:set -DnewVersion=${{ github.event.release.tag_name }}
           ./mvnw -B -ntp versions:set -DnewVersion=${{ github.event.release.tag_name }}
           ./mvnw -B -V -ntp clean package -Pprod -DskipTests
           ./mvnw -B -V -ntp clean package -Pprod -DskipTests
           export VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
           export VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
-          echo ::set-output name=version::${VERSION}
+          echo "version=${VERSION}" >> $GITHUB_OUTPUT
 
 
       - name: Upload files to a GitHub release
       - name: Upload files to a GitHub release
         uses: svenstaro/upload-release-action@2.3.0
         uses: svenstaro/upload-release-action@2.3.0