Skip to content

Commit

Permalink
Update deprecated actions
Browse files Browse the repository at this point in the history
Signed-off-by: Webster Mudge <[email protected]>
  • Loading branch information
wmudge committed Aug 21, 2024
1 parent 91bd3c1 commit 48846ef
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/label_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
github.event.workflow_run.conclusion == 'success'
steps:
- name: Download the PR number artifact
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
Expand Down Expand Up @@ -67,3 +67,15 @@ jobs:
with:
labels: validated
number: ${{ steps.read.outputs.pr_number }}

- name: "Label the PR (replacement)"
uses: "actions/github-script@v7"
with:
script: |
github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
name: 'validated'
});
if: github.event_name == 'pull_request'
13 changes: 10 additions & 3 deletions .github/workflows/reset_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Reset the PR label
uses: actions-ecosystem/action-remove-labels@v1
- name: "Reset the PR label"
uses: "actions/github-script@v7"
with:
labels: validated
script: |
github.rest.issues.removeLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
name: 'validated'
});
if: github.event_name == 'pull_request'
6 changes: 3 additions & 3 deletions .github/workflows/validate_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python and caching
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip'
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
echo $PR_NUMBER > ./pr/pr_number
- name: Upload the PR number
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pr_number
path: pr/
Expand Down

0 comments on commit 48846ef

Please sign in to comment.