Skip to content

Commit

Permalink
Merge pull request #17 from digdir/test-masking-array
Browse files Browse the repository at this point in the history
Test masking release notes array in github action log
  • Loading branch information
bestrand authored Jan 19, 2024
2 parents 0c145cb + 190966c commit e7227a1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/update-release-notes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,20 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Mask release notes array
uses: actions/github-script@v7
with:
script: |
core.setSecret(${{ toJSON(github.event.client_payload.release-notes-array) }});
- run: |
mkdir -p ${{ github.workspace }}/content/${{ github.event.client_payload.product }}/release-notes/
- name: Create release notes list
id: release-note-list
uses: actions/github-script@v7
env:
releaseNotesArray: ${{ toJSON(github.event.client_payload.release-notes-array) }}
with:
script: |
const { releaseNotesArray } = process.env
const fs = require('fs');
const templatePath = '${{ github.workspace }}/.github/templates/template.md';
const filePath = '${{ github.workspace }}/content/${{ github.event.client_payload.product }}/release-notes/${{ github.event.client_payload.application-name }}-${{ github.event.client_payload.version }}.md';
const templateFile = fs.readFileSync(templatePath, 'utf8');
const releaseNotesArray = ${{ toJSON(github.event.client_payload.release-notes-array) }};
const replacements = new Map([
["Bump", "Library upgrades"],
Expand Down

0 comments on commit e7227a1

Please sign in to comment.