mirror of
https://github.com/ps5-linux/ps5-linux-image.git
synced 2026-07-15 21:42:27 +00:00
ci: update actions version; move release date
This commit is contained in:
19
.github/workflows/build-image.yml
vendored
19
.github/workflows/build-image.yml
vendored
@@ -170,7 +170,7 @@ jobs:
|
|||||||
} >> "$GITHUB_OUTPUT"
|
} >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Move latest tag to current commit
|
- name: Move latest tag to current commit
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v8
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const ref = 'tags/latest';
|
const ref = 'tags/latest';
|
||||||
@@ -193,3 +193,20 @@ jobs:
|
|||||||
name: PS5 Linux Image (latest)
|
name: PS5 Linux Image (latest)
|
||||||
body: ${{ steps.body.outputs.text }}
|
body: ${{ steps.body.outputs.text }}
|
||||||
make_latest: true
|
make_latest: true
|
||||||
|
|
||||||
|
- name: Refresh release publish date
|
||||||
|
uses: actions/github-script@v8
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const { data: rel } = await github.rest.repos.getReleaseByTag({
|
||||||
|
...context.repo, tag: 'latest',
|
||||||
|
});
|
||||||
|
// Toggling draft off->on->off re-publishes, resetting published_at
|
||||||
|
// to now while keeping the same release (reactions/comments survive).
|
||||||
|
await github.rest.repos.updateRelease({
|
||||||
|
...context.repo, release_id: rel.id, draft: true,
|
||||||
|
});
|
||||||
|
await github.rest.repos.updateRelease({
|
||||||
|
...context.repo, release_id: rel.id, draft: false, make_latest: 'true',
|
||||||
|
});
|
||||||
|
core.info(`re-published release ${rel.id}`);
|
||||||
|
|||||||
25
.github/workflows/move-release-tag.yml
vendored
25
.github/workflows/move-release-tag.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- name: Move latest tag to commit
|
- name: Move latest tag to commit
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v8
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const ref = 'tags/latest';
|
const ref = 'tags/latest';
|
||||||
@@ -31,3 +31,26 @@ jobs:
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
core.info(`latest -> ${sha}`);
|
core.info(`latest -> ${sha}`);
|
||||||
|
|
||||||
|
- name: Refresh release publish date
|
||||||
|
uses: actions/github-script@v8
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
let rel;
|
||||||
|
try {
|
||||||
|
({ data: rel } = await github.rest.repos.getReleaseByTag({
|
||||||
|
...context.repo, tag: 'latest',
|
||||||
|
}));
|
||||||
|
} catch (e) {
|
||||||
|
if (e.status === 404) { core.info('no latest release yet; skipping'); return; }
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
// Toggling draft off->on->off re-publishes, resetting published_at
|
||||||
|
// to now while keeping the same release (reactions/comments survive).
|
||||||
|
await github.rest.repos.updateRelease({
|
||||||
|
...context.repo, release_id: rel.id, draft: true,
|
||||||
|
});
|
||||||
|
await github.rest.repos.updateRelease({
|
||||||
|
...context.repo, release_id: rel.id, draft: false, make_latest: 'true',
|
||||||
|
});
|
||||||
|
core.info(`re-published release ${rel.id}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user