Skip to content

Commit

Permalink
Upgrade github actions script version
Browse files Browse the repository at this point in the history
  • Loading branch information
julien bignon committed Aug 28, 2024
1 parent 8785721 commit 36efc8b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/buildOnlyModified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ jobs:
id: extract_version
run: echo "::set-output name=v::$(cat version.properties | grep 'semver' | sed -e 's/^version.semver=//')"
- name: List all releases
uses: actions/github-script@0.3.0
uses: actions/github-script@v7
with:
github-token: ${{ secrets.TOKEN_GITHUB }}
script: |
const result = await github.repos.listReleases(context.repo);
const result = await github.rest.repos.listReleases(context.repo);
result.data
.filter(release => release.tag_name == "${{ steps.extract_version.outputs.v }}")
.forEach(function(release){
const releaseObj = {release_id:release.id, owner:context.repo.owner, repo:context.repo.repo}
github.repos.deleteRelease(releaseObj)
github.rest.repos.deleteRelease(releaseObj)
});
- name: Create Release
id: create_release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create_issue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
{panel}
- name: Change Title
uses: actions/github-script@0.8.0
uses: actions/github-script@v7
env:
ISSUE_TITLE: ${{ github.event.issue.title}}
with:
Expand All @@ -51,7 +51,7 @@ jobs:
})
- name: Add comment after sync
uses: actions/github-script@0.8.0
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ jobs:
./gradlew promote --stacktrace
- name: Delete PreRelease
id: delete_prerelease
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
github-token: ${{ secrets.TOKEN_GITHUB }}
script: |
const result = await github.repos.listReleases(context.repo);
const result = await github.rest.repos.listReleases(context.repo);
result.data
.filter(release => release.tag_name == "${{ steps.extract_pr_version.outputs.v }}")
.forEach(function(release){
const releaseObj = {release_id:release.id, owner:context.repo.owner, repo:context.repo.repo}
github.repos.deleteRelease(releaseObj)
github.rest.repos.deleteRelease(releaseObj)
});
- name: Delete PreRelease Tag
run: |
git config --local user.email "github-action@saagie.com"
git config --local user.name "GitHub Action Bot"
remote_repo="https://${{ github.actor }}:${{ secrets.TOKEN_GITHUB }}@github.com/${{ github.repository }}.git"
remote_repo="https://${{ github.actor }}:${{ secrets.TOKEN_GITHUB }}@github.com/${{ github.rest.repository }}.git"
git push --delete "${remote_repo}" ${{ steps.extract_pr_version.outputs.v }}
- name: Remove buildMeta version
run: |
Expand Down

0 comments on commit 36efc8b

Please sign in to comment.