From cfe6ed8ab612b2475d5d3e193243aae6f460215d Mon Sep 17 00:00:00 2001 From: Nedimar Turatti Date: Tue, 12 Dec 2023 13:03:34 -0300 Subject: [PATCH] Remove Github action set-output. Remove plugincheck. --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 36 +++++++++++++++++------------------ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b22838..1cbf6ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: - 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 - name: Cache yarn cache uses: actions/cache@v3 @@ -51,7 +51,7 @@ jobs: run: | if [ -f "Magefile.go" ] then - echo "::set-output name=has-backend::true" + echo "has-backend=true" >> $GITHUB_OUTPUT fi - name: Setup Go environment diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da7cb09..52e2ed6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: - 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 - name: Cache yarn cache uses: actions/cache@v3 @@ -58,7 +58,7 @@ jobs: run: | if [ -f "Magefile.go" ] then - echo "::set-output name=has-backend::true" + echo "has-backend=true" >> $GITHUB_OUTPUT fi - name: Setup Go environment @@ -97,19 +97,19 @@ jobs: export GRAFANA_PLUGIN_ARTIFACT=${GRAFANA_PLUGIN_ID}-${GRAFANA_PLUGIN_VERSION}-linux.zip export GRAFANA_PLUGIN_ARTIFACT_CHECKSUM=${GRAFANA_PLUGIN_ARTIFACT}.md5 - echo "::set-output name=plugin-id::${GRAFANA_PLUGIN_ID}" - echo "::set-output name=plugin-version::${GRAFANA_PLUGIN_VERSION}" - echo "::set-output name=plugin-type::${GRAFANA_PLUGIN_TYPE}" - echo "::set-output name=archive::${GRAFANA_PLUGIN_ARTIFACT}" - echo "::set-output name=archive-checksum::${GRAFANA_PLUGIN_ARTIFACT_CHECKSUM}" + echo "plugin-id=${GRAFANA_PLUGIN_ID}" >> $GITHUB_OUTPUT + echo "plugin-version=${GRAFANA_PLUGIN_VERSION}" >> $GITHUB_OUTPUT + echo "plugin-type=${GRAFANA_PLUGIN_TYPE}" >> $GITHUB_OUTPUT + echo "archive=${GRAFANA_PLUGIN_ARTIFACT}" >> $GITHUB_OUTPUT + echo "archive-checksum=${GRAFANA_PLUGIN_ARTIFACT_CHECKSUM}" >> $GITHUB_OUTPUT - echo ::set-output name=github-tag::${GITHUB_REF#refs/*/} + echo ::github-tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT - name: Read changelog id: changelog run: | awk '/^## / {s++} s == 1 {print}' CHANGELOG.md > release_notes.md - echo "::set-output name=path::release_notes.md" + echo "path=release_notes.md" >> $GITHUB_OUTPUT - name: Check package version 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 @@ -120,15 +120,15 @@ jobs: mv dist ${{ steps.metadata.outputs.plugin-id }} zip ${{ steps.metadata.outputs.archive }} ${{ steps.metadata.outputs.plugin-id }} -r md5sum ${{ steps.metadata.outputs.archive }} > ${{ steps.metadata.outputs.archive-checksum }} - echo "::set-output name=checksum::$(cat ./${{ steps.metadata.outputs.archive-checksum }} | cut -d' ' -f1)" - - - name: Lint plugin - run: | - git clone https://github.com/grafana/plugin-validator - pushd ./plugin-validator/pkg/cmd/plugincheck - go install - popd - plugincheck ${{ steps.metadata.outputs.archive }} + echo "checksum::$(cat ./${{ steps.metadata.outputs.archive-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT + + # - name: Lint plugin + # run: | + # git clone https://github.com/grafana/plugin-validator + # pushd ./plugin-validator/pkg/cmd/plugincheck + # go install + # popd + # plugincheck ${{ steps.metadata.outputs.archive }} - name: Create release id: create_release