Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/qld-gov-au/formio into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
duttonw committed Jun 19, 2024
2 parents e279ddc + 7773526 commit c015bbd
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ updates:
schedule:
interval: daily
time: "19:00"
groups:
storybook:
patterns:
- "@storybook/*"
- storybook
open-pull-requests-limit: 10
reviewers:
- duttonw
Expand Down
49 changes: 38 additions & 11 deletions .github/workflows/Storybook-library-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ on:
inputs:
description:
description: 'Manual run of update Libs'
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write #Work with the contents of the repository. For example, contents: read permits an action to list the commits, and contents: write allows the action to create a release.
#pages: write #Work with GitHub Pages. For example, pages: write permits an action to request a GitHub Pages build.
actions: read #Work with GitHub Actions. For example, actions: write permits an action to cancel a workflow run.
id-token: write #Fetch an OpenID Connect (OIDC) token. This requires id-token: write.
pull-requests: write #Work with pull requests. For example, pull-requests: write permits an action to add a label to a pull request.

jobs:
updateLibs:
Expand Down Expand Up @@ -47,22 +54,42 @@ jobs:
node-version: 20
cache: 'npm'

- name: Install
run: | # Install packages
npm install --prefer-offline --no-audit --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.NEXUSREADONLY2NPMTOKEN }}

# `npm rebuild` will run all those post-install scripts for us.
- name: rebuild and prepare
run: npm rebuild && npm run prepare --if-present

- name: List versions
run: | # List versions
npm view storybook versions
- name: What changed
run: |
export outdated=`npm outdated`
echo $outdated >> $GITHUB_STEP_SUMMARY
export version=`echo $outdated|grep ^storybook|awk '{ print $4 }'`
echo '::set-output name=OUTDATED_LIST::$outdated'
echo '::set-output name=OUTDATED_VERSION::$version'
export outdated="`npm outdated --parsable `"
echo '### Outdated' >> $GITHUB_STEP_SUMMARY
echo "$outdated" >> $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
echo 'OUTDATED_LIST<<EOF' >> $GITHUB_OUTPUT
echo "$outdated" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
echo "OUTDATED_VERSION<<EOF" >> $GITHUB_OUTPUT
npm outdated --parsable|grep ^storybook|awk '{ print $4 }' >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
echo $outdated|grep ^storybook|awk '{ print $4 }'
id: what-changed-data

- name: Update package.json
- name: Update package.json ${{ steps.what-changed-data.outputs.OUTDATED_VERSION }}
run: | # Update storybook
npx storybook@latest upgrade -y -c .storybook
npx storybook@latest upgrade -y
- name: Install latest
run: | # Install packages https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#use-private-packages
npm install --no-audit --ignore-scripts
Expand All @@ -77,7 +104,7 @@ jobs:
uses: peter-evans/create-pull-request@v4
with:
commit-message: "update storybook js libraries \r\n ${{ steps.what-changed-data.outputs.OUTDATED_LIST }}"
title: update storybook ${{ steps.what-changed-data.outputs.OUTDATED_VERSION }}"
body: "update storybook js premium libraries ${{ steps.what-changed-data.outputs.OUTDATED_LIST }}"
branch: update-storybook-libraries
base: main
title: "update storybook ${{ steps.what-changed-data.outputs.OUTDATED_VERSION }}"
body: "update storybook \r\n ### Please Manually close pull requests and immediately reopen them. This will enable on: pull_request workflows to run and be added as checks. \r\n ${{ steps.what-changed-data.outputs.OUTDATED_LIST }}"
branch: "update-storybook-libraries-${{ steps.what-changed-data.outputs.OUTDATED_VERSION }}"
base: develop
2 changes: 1 addition & 1 deletion .github/workflows/compile.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
id: extract_branch

- name: display branch name
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/formioGridLibUpdate.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
outdated="${outdated//'%'/'%25'}"
outdated="${outdated//$'\n'/'%0A'}"
outdated="${outdated//$'\r'/'%0D'}"
echo '::set-output name=OUTDATED_LIST::$outdated'
echo 'OUTDATED_LIST=$outdated' >> $GITHUB_OUTPUT
env:
NODE_AUTH_TOKEN: ${{ secrets.NEXUSREADONLY2NPMTOKEN }}
id: what-changed-data
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/formioJSLibUpdate.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
outdated="${outdated//'%'/'%25'}"
outdated="${outdated//$'\n'/'%0A'}"
outdated="${outdated//$'\r'/'%0D'}"
echo '::set-output name=OUTDATED_LIST::$outdated'
echo 'OUTDATED_LIST=$outdated' >> $GITHUB_OUTPUT
env:
NODE_AUTH_TOKEN: ${{ secrets.NEXUSREADONLY2NPMTOKEN }}
id: what-changed-data
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/formioLibUpdate.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
outdated="${outdated//'%'/'%25'}"
outdated="${outdated//$'\n'/'%0A'}"
outdated="${outdated//$'\r'/'%0D'}"
echo '::set-output name=OUTDATED_LIST::$outdated'
echo 'OUTDATED_LIST=$outdated' >> $GITHUB_OUTPUT
env:
NODE_AUTH_TOKEN: ${{ secrets.NEXUSREADONLY2NPMTOKEN }}
id: what-changed-data
Expand Down

0 comments on commit c015bbd

Please sign in to comment.