Skip to content

Commit

Permalink
fixup! Add workflow for apt-get release
Browse files Browse the repository at this point in the history
Upgrade 'actions/github-script' from v3 to v6 to silence the Node.js 12
deprecation warning. Note that this also includes an update to how the
'github' object is accessed in the script ('github' -> 'github.rest')
due to a breaking change introduced in v5 [1].

[1] https://github.com/actions/github-script#breaking-changes-in-v5

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Mar 17, 2023
1 parent c26c700 commit 258464d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release-apt-get.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
rm repoclient.deb
- name: "Configure Repo Client"
uses: actions/github-script@v3
uses: actions/github-script@v6
env:
AZURE_AAD_ID: ${{ secrets.AZURE_AAD_ID }}
AAD_CLIENT_SECRET: ${{ secrets.AAD_CLIENT_SECRET }}
Expand All @@ -59,11 +59,11 @@ jobs:
id: get-asset
env:
RELEASE: ${{ github.event.inputs.release }}
uses: actions/github-script@v3
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const { data } = await github.repos.getRelease({
const { data } = await github.rest.repos.getRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: process.env.RELEASE || 'latest'
Expand All @@ -73,7 +73,7 @@ jobs:
throw new Error(`Unexpected number of .deb assets: ${assets.length}`)
}
const fs = require('fs')
const buffer = await github.repos.getReleaseAsset({
const buffer = await github.rest.repos.getReleaseAsset({
headers: {
accept: 'application/octet-stream'
},
Expand Down

0 comments on commit 258464d

Please sign in to comment.