Skip to content

Commit

Permalink
chore: update snapshot workflow (#412)
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Zantow <kzantow@gmail.com>
  • Loading branch information
kzantow authored Apr 12, 2023
1 parent 9cf3dcd commit 800a56f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/update-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ jobs:
ports:
- 5000:5000
steps:
- uses: actions/github-script@v3
id: get-pr
with:
script: |
const request = {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number
}
core.info(`Getting PR #${request.pull_number} from ${request.owner}/${request.repo}`)
try {
const result = await github.pulls.get(request)
return result.data
} catch (err) {
core.setFailed(`Request failed with error ${err}`)
}
- name: Generate token
uses: tibdex/github-app-token@v1
id: generate-token
Expand All @@ -27,6 +43,8 @@ jobs:
uses: actions/checkout@v3
with:
token: ${{ steps.generate-token.outputs.token }}
repository: ${{ fromJSON(steps.get-pr.outputs.result).head.repo.full_name }}
ref: ${{ fromJSON(steps.get-pr.outputs.result).head.ref }}
- name: Build images
run: |
for distro in alpine centos debian; do
Expand Down

0 comments on commit 800a56f

Please sign in to comment.