Skip to content

Commit

Permalink
updates for github script v6
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmelt committed Sep 12, 2023
1 parent 44bc51a commit d855fe3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/post_release_clamav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ jobs:
// const tag = context.ref.replace("refs/tags/", "");
console.log("tag = ", tag);
// Get release for this tag
const release = await github.repos.getReleaseByTag({
const release = await github.rest.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag
});
// Upload the release asset
await github.repos.uploadReleaseAsset({
await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.data.id,
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/post_release_trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,21 +188,21 @@ jobs:
// const tag = context.ref.replace("refs/tags/", "");
console.log("tag = ", tag);
// Get release for this tag
const release = await github.repos.getReleaseByTag({
const release = await github.rest.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag
});
// Upload the release asset
await github.repos.uploadReleaseAsset({
await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.data.id,
name: "${{ steps.date.outputs.date }}_trivy_results_v${{ github.event.inputs.version }}.zip",
data: await fs.readFileSync("trivy_results.zip")
});
// Upload the release asset
await github.repos.uploadReleaseAsset({
await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.data.id,
Expand Down

0 comments on commit d855fe3

Please sign in to comment.