Skip to content

Commit

Permalink
Merge branch 'v2.x/staging' into user/markackert/dependabot-config-up…
Browse files Browse the repository at this point in the history
…dates
  • Loading branch information
MarkAckert authored Jun 13, 2024
2 parents 7c68c28 + 1f4cc39 commit 042121d
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 5 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/diff-schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Generate schema diff
on:
push:
branches:
- v1.x/master
- v2.x/master
- v3.x/master

workflow_dispatch:
inputs:
FROM_COMMIT:
description: 'Specify tag (v prefix) to diff from'
required: false
TO_COMMIT:
description: 'Specify tag (v prefix) to diff to'
required: false

jobs:
diff:
runs-on: ubuntu-latest
steps:
- name: '[Prep 1] Checkout'
uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: '[Prep 2] Setup Node'
uses: actions/setup-node@v2
with:
node-version: 18
- name: '[Prep 3] Get to version'
run: node -e "const fs = require('fs'); const currentVersion = JSON.parse(fs.readFileSync('./manifest.json.template', 'utf8')).version; if ('${{ github.event.inputs.TO_COMMIT }}'.length > 0) { console.log('TO=${{ github.event.inputs.TO_COMMIT }}')} else { console.log('TO=v'+currentVersion) }" >> $GITHUB_ENV
- name: '[Prep 4] Get from version'
run: node -e "if ('${{ github.event.inputs.FROM_COMMIT }}'.length > 0) { console.log('FROM=${{ github.event.inputs.FROM_COMMIT }}') } else { let parts = '${{ env.TO }}'.split('.'); parts[1]--; console.log('FROM='+parts.join('.')); }" >> $GITHUB_ENV
- name: '[Build] Make diff'
run: git diff ${{ env.FROM }} ${{ env.TO }} -- schemas > schemas.diff
- name: '[Upload]'
uses: actions/upload-artifact@v3
with:
name: schemas.diff
path: schemas.diff
if-no-files-found: error
8 changes: 4 additions & 4 deletions .github/workflows/diff-yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Generate schema diff
name: Generate example yaml diff
on:
push:
branches:
Expand Down Expand Up @@ -32,10 +32,10 @@ jobs:
- name: '[Prep 4] Get from version'
run: node -e "if ('${{ github.event.inputs.FROM_COMMIT }}'.length > 0) { console.log('FROM=${{ github.event.inputs.FROM_COMMIT }}') } else { let parts = '${{ env.TO }}'.split('.'); parts[1]--; console.log('FROM='+parts.join('.')); }" >> $GITHUB_ENV
- name: '[Build] Make diff'
run: git diff ${{ env.FROM }} ${{ env.TO }} -- example-zowe.yaml > yaml.diff
run: git diff ${{ env.FROM }} ${{ env.TO }} -- example-zowe.yaml > example-yaml.diff
- name: '[Upload]'
uses: actions/upload-artifact@v3
with:
name: schemas.diff
path: schemas.diff
name: example-yaml.diff
path: example-yaml.diff
if-no-files-found: error
2 changes: 1 addition & 1 deletion .github/workflows/snyk-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ jobs:
uses: snyk/actions/docker@master
# we don't have original Dockerfile, cannot generate and upload sarif
with:
image: ${{ matrix.image }}
image: ${{ matrix.images }}
command: test

0 comments on commit 042121d

Please sign in to comment.