mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-03-03 02:01:47 -05:00
Update PR artifacts actions and exclude soh.otr (#4558)
* update pr artifacts actions and exclude soh.otr * remove deprecated save-always for windows cache
This commit is contained in:
parent
3f2d8ddc01
commit
53b72a2507
1
.github/workflows/generate-builds.yml
vendored
1
.github/workflows/generate-builds.yml
vendored
@ -244,7 +244,6 @@ jobs:
|
||||
- name: Cache build folder
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
save-always: true
|
||||
key: ${{ runner.os }}-build-${{ github.ref }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ github.ref }}
|
||||
|
13
.github/workflows/pr-artifacts.yml
vendored
13
.github/workflows/pr-artifacts.yml
vendored
@ -12,7 +12,7 @@ jobs:
|
||||
if: ${{ github.event.workflow_run.event == 'pull_request' }}
|
||||
steps:
|
||||
- id: 'pr-number'
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
@ -20,8 +20,9 @@ jobs:
|
||||
const pullHeadSHA = '${{github.event.workflow_run.head_sha}}';
|
||||
const pullUserId = ${{github.event.sender.id}};
|
||||
const prNumber = await (async () => {
|
||||
const pulls = await github.rest.pulls.list({owner, repo});
|
||||
for await (const {data} of github.paginate.iterator(pulls)) {
|
||||
for await (const { data } of github.paginate.iterator(
|
||||
github.rest.pulls.list, { owner, repo }
|
||||
)) {
|
||||
for (const pull of data) {
|
||||
if (pull.head.sha === pullHeadSHA && pull.user.id === pullUserId) {
|
||||
return pull.number;
|
||||
@ -36,7 +37,7 @@ jobs:
|
||||
|
||||
return prNumber;
|
||||
- id: 'artifacts-text'
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
@ -47,13 +48,13 @@ jobs:
|
||||
});
|
||||
|
||||
return allArtifacts.data.artifacts.reduce((acc, item) => {
|
||||
if (item.name === "assets") return acc;
|
||||
if (item.name === "soh.otr") return acc;
|
||||
acc += `
|
||||
- [${item.name}.zip](https://nightly.link/${context.repo.owner}/${context.repo.repo}/actions/artifacts/${item.id}.zip)`;
|
||||
return acc;
|
||||
}, '### Build Artifacts');
|
||||
- id: 'add-to-pr'
|
||||
uses: garrettjoecox/pr-section@3.1.0
|
||||
uses: garrettjoecox/pr-section@4.0.0
|
||||
with:
|
||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
pr-number: ${{ steps.pr-number.outputs.result }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user