mirror of
https://github.com/actions/runner-container-hooks.git
synced 2025-12-14 08:36:45 +00:00
Include sha256 checksums in releaseNotes (#98)
* Include sha256 checksums in releaseNotes * Add ul for sha
This commit is contained in:
20
.github/workflows/release.yaml
vendored
20
.github/workflows/release.yaml
vendored
@@ -12,6 +12,20 @@ jobs:
|
|||||||
name: Bootstrap the packages
|
name: Bootstrap the packages
|
||||||
- run: npm run build-all
|
- run: npm run build-all
|
||||||
name: Build packages
|
name: Build packages
|
||||||
|
- name: Zip up releases
|
||||||
|
run: |
|
||||||
|
zip -r -j actions-runner-hooks-docker-${{ steps.releaseNotes.outputs.version }}.zip packages/docker/dist
|
||||||
|
zip -r -j actions-runner-hooks-k8s-${{ steps.releaseNotes.outputs.version }}.zip packages/k8s/dist
|
||||||
|
- name: Calculate SHA
|
||||||
|
id: sha
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sha_docker=$(sha256sum actions-runner-hooks-docker-${{ steps.releaseNotes.outputs.version }}.zip | awk '{print $1}')
|
||||||
|
echo "Docker SHA: $sha_docker"
|
||||||
|
echo "docker-sha=$sha_docker" >> $GITHUB_OUTPUT
|
||||||
|
sha_k8s=$(sha256sum actions-runner-hooks-k8s-${{ steps.releaseNotes.outputs.version }}.zip | awk '{print $1}')
|
||||||
|
echo "K8s SHA: $sha_k8s"
|
||||||
|
echo "k8s-sha=$sha_k8s" >> $GITHUB_OUTPUT
|
||||||
- uses: actions/github-script@v6
|
- uses: actions/github-script@v6
|
||||||
id: releaseNotes
|
id: releaseNotes
|
||||||
with:
|
with:
|
||||||
@@ -20,13 +34,11 @@ jobs:
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const hookVersion = require('./package.json').version
|
const hookVersion = require('./package.json').version
|
||||||
var releaseNotes = fs.readFileSync('${{ github.workspace }}/releaseNotes.md', 'utf8').replace(/<HOOK_VERSION>/g, hookVersion)
|
var releaseNotes = fs.readFileSync('${{ github.workspace }}/releaseNotes.md', 'utf8').replace(/<HOOK_VERSION>/g, hookVersion)
|
||||||
|
releaseNotes = releaseNotes.replace(/<DOCKER_SHA>/g, '${{ steps.sha.outputs.docker-sha }}')
|
||||||
|
releaseNotes = releaseNotes.replace(/<K8S_SHA>/g, '${{ steps.sha.outputs.k8s-sha }}')
|
||||||
console.log(releaseNotes)
|
console.log(releaseNotes)
|
||||||
core.setOutput('version', hookVersion);
|
core.setOutput('version', hookVersion);
|
||||||
core.setOutput('note', releaseNotes);
|
core.setOutput('note', releaseNotes);
|
||||||
- name: Zip up releases
|
|
||||||
run: |
|
|
||||||
zip -r -j actions-runner-hooks-docker-${{ steps.releaseNotes.outputs.version }}.zip packages/docker/dist
|
|
||||||
zip -r -j actions-runner-hooks-k8s-${{ steps.releaseNotes.outputs.version }}.zip packages/k8s/dist
|
|
||||||
- uses: actions/create-release@v1
|
- uses: actions/create-release@v1
|
||||||
id: createRelease
|
id: createRelease
|
||||||
name: Create ${{ steps.releaseNotes.outputs.version }} Hook Release
|
name: Create ${{ steps.releaseNotes.outputs.version }} Hook Release
|
||||||
|
|||||||
@@ -4,3 +4,10 @@
|
|||||||
- Handle `$` symbols in environment variable names and values in k8s [#74]
|
- Handle `$` symbols in environment variable names and values in k8s [#74]
|
||||||
|
|
||||||
<!-- ## Misc -->
|
<!-- ## Misc -->
|
||||||
|
|
||||||
|
## SHA-256 Checksums
|
||||||
|
|
||||||
|
The SHA-256 checksums for the packages included in this build are shown below:
|
||||||
|
|
||||||
|
- actions-runner-hooks-docker-<HOOK_VERSION>.zip <DOCKER_SHA>
|
||||||
|
- actions-runner-hooks-k8s-<HOOK_VERSION>.zip <K8S_SHA>
|
||||||
|
|||||||
Reference in New Issue
Block a user