Skip to content

Commit 2c53f68

Browse files
committed
ci: remove deprecated feature Github workflow set-output
1 parent acce822 commit 2c53f68

File tree

2 files changed

+18
-40
lines changed

2 files changed

+18
-40
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
- name: Get yarn cache directory path
2222
id: yarn-cache-dir-path
23-
run: echo "::set-output name=dir::$(yarn cache dir)"
23+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
2424

2525
- name: Cache yarn cache
2626
uses: actions/cache@v4
@@ -46,22 +46,12 @@ jobs:
4646
- name: Build and test frontend
4747
run: yarn build
4848

49-
- name: Check for backend
50-
id: check-for-backend
51-
run: |
52-
if [ -f "Magefile.go" ]
53-
then
54-
echo "::set-output name=has-backend::true"
55-
fi
56-
5749
- name: Setup Go environment
58-
if: steps.check-for-backend.outputs.has-backend == 'true'
5950
uses: actions/setup-go@v5
6051
with:
6152
go-version: "1.22"
6253

6354
- name: Test backend
64-
if: steps.check-for-backend.outputs.has-backend == 'true'
6555
uses: magefile/mage-action@v3
6656
with:
6757
version: latest
@@ -74,7 +64,6 @@ jobs:
7464
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
7565

7666
- name: Build backend
77-
if: steps.check-for-backend.outputs.has-backend == 'true'
7867
uses: magefile/mage-action@v3
7968
with:
8069
version: latest

.github/workflows/release.yml

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
- name: Get yarn cache directory path
2626
id: yarn-cache-dir-path
27-
run: echo "::set-output name=dir::$(yarn cache dir)"
27+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
2828

2929
- name: Cache yarn cache
3030
uses: actions/cache@v4
@@ -53,23 +53,13 @@ jobs:
5353
- name: Build and test frontend
5454
run: yarn build
5555

56-
- name: Check for backend
57-
id: check-for-backend
58-
run: |
59-
if [ -f "Magefile.go" ]
60-
then
61-
echo "::set-output name=has-backend::true"
62-
fi
63-
6456
- name: Test backend
65-
if: steps.check-for-backend.outputs.has-backend == 'true'
6657
uses: magefile/mage-action@v3
6758
with:
6859
version: latest
6960
args: coverage
7061

7162
- name: Build backend
72-
if: steps.check-for-backend.outputs.has-backend == 'true'
7363
uses: magefile/mage-action@v3
7464
with:
7565
version: latest
@@ -86,30 +76,29 @@ jobs:
8676
export GRAFANA_PLUGIN_ARTIFACT=${GRAFANA_PLUGIN_ID}.zip
8777
export GRAFANA_PLUGIN_ARTIFACT_CHECKSUM=${GRAFANA_PLUGIN_ARTIFACT}.md5
8878
89-
echo "::set-output name=plugin-id::${GRAFANA_PLUGIN_ID}"
90-
echo "::set-output name=plugin-version::${GRAFANA_PLUGIN_VERSION}"
91-
echo "::set-output name=plugin-type::${GRAFANA_PLUGIN_TYPE}"
92-
echo "::set-output name=archive::${GRAFANA_PLUGIN_ARTIFACT}"
93-
echo "::set-output name=archive-checksum::${GRAFANA_PLUGIN_ARTIFACT_CHECKSUM}"
94-
95-
echo ::set-output name=github-tag::${GITHUB_REF#refs/*/}
79+
echo "plugin_id=${GRAFANA_PLUGIN_ID}" >> $GITHUB_OUTPUT
80+
echo "plugin_version=${GRAFANA_PLUGIN_VERSION}" >> $GITHUB_OUTPUT
81+
echo "plugin_type=${GRAFANA_PLUGIN_TYPE}" >> $GITHUB_OUTPUT
82+
echo "archive=${GRAFANA_PLUGIN_ARTIFACT}" >> $GITHUB_OUTPUT
83+
echo "archive_checksum=${GRAFANA_PLUGIN_ARTIFACT_CHECKSUM}" >> $GITHUB_OUTPUT
84+
echo "github_tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
9685
9786
- name: Read changelog
9887
id: changelog
9988
run: |
10089
awk '/^## / {s++} s == 1 {print}' CHANGELOG.md > release_notes.md
101-
echo "::set-output name=path::release_notes.md"
90+
echo "changelog_path=release_notes.md" >> $GITHUB_OUTPUT
10291
10392
- name: Check package version
104-
run: if [ "v${{ steps.metadata.outputs.plugin-version }}" != "${{ steps.metadata.outputs.github-tag }}" ]; then printf "\033[0;31mPlugin version doesn't match tag name\033[0m\n"; exit 1; fi
93+
run: if [ "v${{ steps.metadata.outputs.plugin_version }}" != "${{ steps.metadata.outputs.github_tag }}" ]; then printf "\033[0;31mPlugin version doesn't match tag name\033[0m\n"; exit 1; fi
10594

10695
- name: Package plugin
10796
id: package-plugin
10897
run: |
109-
mv dist ${{ steps.metadata.outputs.plugin-id }}
110-
zip ${{ steps.metadata.outputs.archive }} ${{ steps.metadata.outputs.plugin-id }} -r
111-
md5sum ${{ steps.metadata.outputs.archive }} > ${{ steps.metadata.outputs.archive-checksum }}
112-
echo "::set-output name=checksum::$(cat ./${{ steps.metadata.outputs.archive-checksum }} | cut -d' ' -f1)"
98+
mv dist ${{ steps.metadata.outputs.plugin_id }}
99+
zip ${{ steps.metadata.outputs.archive }} ${{ steps.metadata.outputs.plugin_id }} -r
100+
md5sum ${{ steps.metadata.outputs.archive }} > ${{ steps.metadata.outputs.archive_checksum }}
101+
echo "checksum=$(cat ./${{ steps.metadata.outputs.archive_checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT
113102
114103
- name: Create release
115104
id: create_release
@@ -119,8 +108,8 @@ jobs:
119108
with:
120109
tag_name: ${{ github.ref }}
121110
release_name: Release ${{ github.ref }}
122-
body_path: ${{ steps.changelog.outputs.path }}
123-
draft: true
111+
body_path: ${{ steps.changelog.outputs.changelog_path }}
112+
draft: false
124113

125114
- name: Add plugin to release
126115
id: upload-plugin-asset
@@ -140,6 +129,6 @@ jobs:
140129
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141130
with:
142131
upload_url: ${{ steps.create_release.outputs.upload_url }}
143-
asset_path: ./${{ steps.metadata.outputs.archive-checksum }}
144-
asset_name: ${{ steps.metadata.outputs.archive-checksum }}
132+
asset_path: ./${{ steps.metadata.outputs.archive_checksum }}
133+
asset_name: ${{ steps.metadata.outputs.archive_checksum }}
145134
asset_content_type: text/plain

0 commit comments

Comments
 (0)