Skip to content

Commit

Permalink
Remove usage of deprecated ::set-output GitHub Actions feature
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron committed Nov 1, 2022
1 parent 45bcb50 commit 041f264
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
name: Release Docker image
needs: ["build", "test"]
if: ${{ github.event_name == 'push'
&& startsWith(github.ref, 'refs/tags/') }}
&& startsWith(github.ref, 'refs/tags/') }}
strategy:
fail-fast: false
matrix:
Expand All @@ -80,13 +80,13 @@ jobs:
steps:
# Skip if this is fork and no credentials are provided.
- id: skip
run: echo ::set-output name=no::${{ !(
run: echo "no=${{ !(
github.repository_owner != 'instrumentisto'
&& ((matrix.registry == 'quay.io'
&& secrets.QUAYIO_ROBOT_USER == '')
|| (matrix.registry == 'docker.io'
&& secrets.DOCKERHUB_BOT_USER == ''))
) }}
) }}" >> $GITHUB_OUTPUT

- uses: actions/checkout@v3
if: ${{ steps.skip.outputs.no == 'true' }}
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
DOCKER_USER: ${{ secrets.DOCKERHUB_BOT_USER }}
DOCKER_PASS: ${{ secrets.DOCKERHUB_BOT_PASS }}
if: ${{ steps.skip.outputs.no == 'true'
&& matrix.registry == 'docker.io' }}
&& matrix.registry == 'docker.io' }}
- name: Update README on Quay.io
uses: christian-korneck/update-container-description-action@v1
with:
Expand All @@ -150,13 +150,13 @@ jobs:
env:
DOCKER_APIKEY: ${{ secrets.QUAYIO_API_TOKEN }}
if: ${{ steps.skip.outputs.no == 'true'
&& matrix.registry == 'quay.io' }}
&& matrix.registry == 'quay.io' }}

release-github:
name: Release on GitHub
needs: ["release-docker"]
if: ${{ github.event_name == 'push'
&& startsWith(github.ref, 'refs/tags/') }}
&& startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -167,14 +167,15 @@ jobs:
with:
text: ${{ github.ref }}
regex: '^refs/tags/((([0-9]+)\.[0-9]+)(\.[0-9]+)?-(.+))$'

- name: Parse CHANGELOG link
id: changelog
run: echo ::set-output
name=LINK::${{ github.server_url }}/${{ github.repository }}/blob/${{ steps.semver.outputs.group1 }}/CHANGELOG.md#$(sed -n '/^## \[${{ steps.semver.outputs.group1 }}\]/{s/^## \[\(.*\)\][^0-9]*\([0-9].*\)/\1--\2/;s/[^0-9a-z-]*//g;p;}' CHANGELOG.md)
run: echo "link=${{ github.server_url }}/${{ github.repository }}/blob/${{ steps.semver.outputs.group1 }}/CHANGELOG.md#$(sed -n '/^## \[${{ steps.semver.outputs.group1 }}\]/{s/^## \[\(.*\)\][^0-9]*\([0-9].*\)/\1--\2/;s/[^0-9a-z-]*//g;p;}' CHANGELOG.md)"
>> $GITHUB_OUTPUT

- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.semver.outputs.group1 }}
body: |
[Changelog](${{ steps.changelog.outputs.LINK }})
[Changelog](${{ steps.changelog.outputs.link }})

0 comments on commit 041f264

Please sign in to comment.