Skip to content

Commit

Permalink
workflows: update actions to current major versions
Browse files Browse the repository at this point in the history
  • Loading branch information
bgilbert committed Jan 4, 2023
1 parent 7ac54b2 commit 223ac9a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/post-rollouts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ permissions:

jobs:
post-rollouts:
name: "Post rollouts to PR"
name: Post rollouts to PR
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download state
uses: actions/github-script@v3
uses: actions/github-script@v6
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id}},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "validation-results"
})[0];
var download = await github.actions.downloadArtifact({
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
Expand All @@ -45,13 +45,13 @@ jobs:
cd validation-results
unzip ../validation-results.zip
- name: Comment on PR
uses: actions/github-script@v3
uses: actions/github-script@v6
with:
script: |
var fs = require('fs');
var pr_number = Number(fs.readFileSync('validation-results/PR'));
var rollouts = fs.readFileSync('validation-results/rollouts');
await github.issues.createComment({
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr_number,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/print-rollouts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
Expand All @@ -33,7 +33,7 @@ jobs:
echo "${{ github.event.number }}" > validation-results/PR
mv rollouts validation-results/
- name: Upload state for PR comment
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: validation-results
path: validation-results/
6 changes: 3 additions & 3 deletions .github/workflows/promote-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ jobs:
echo "target_stream=${title%:*}" >> $GITHUB_ENV
echo "src_stream=${src_stream}" >> $GITHUB_ENV
- name: Checkout fedora-coreos-config
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: coreos/fedora-coreos-config
ref: ${{ env.target_stream }}
path: fcos
token: ${{ secrets.COREOSBOT_RELENG_TOKEN }}
- name: Checkout fedora-coreos-releng-automation
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: coreos/fedora-coreos-releng-automation
path: fcos-releng-auto
Expand All @@ -63,7 +63,7 @@ jobs:
../fcos-releng-auto/scripts/promote-config.sh ${src_stream}
echo "commit_title=$(git log --pretty=format:%s -1 HEAD)" >> $GITHUB_ENV
- name: Open pull request
uses: peter-evans/create-pull-request@v3.8.2
uses: peter-evans/create-pull-request@v4.2.3
with:
token: ${{ secrets.COREOSBOT_RELENG_TOKEN }}
path: fcos
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/rollout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ jobs:
- name: Install dependencies
run: pip install python-dateutil dateparser
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# We need an unbroken commit chain when pushing to the fork. Don't
# make assumptions about which commits are already available there.
fetch-depth: 0
- name: Check out fedora-coreos-stream-generator
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: coreos/fedora-coreos-stream-generator
path: generator
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
echo "BRANCH_NAME=${branch_name}" >> ${GITHUB_ENV}
echo "ROLLOUT_DESC=${rollout_desc}" >> ${GITHUB_ENV}
- name: Open pull request
uses: peter-evans/create-pull-request@v3.8.2
uses: peter-evans/create-pull-request@v4.2.3
with:
token: ${{ secrets.COREOSBOT_RELENG_TOKEN }}
branch: ${{ env.BRANCH_NAME }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stream-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Genericize metadata
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Syntax check
run: make syntax-check
- name: Check stream generator for dirty working tree
Expand Down

0 comments on commit 223ac9a

Please sign in to comment.