Skip to content

Commit

Permalink
Merge pull request #74 from zowe/ci/update-workflows-v2
Browse files Browse the repository at this point in the history
Update GH workflows to prepare for V3
  • Loading branch information
zFernand0 authored Sep 24, 2024
2 parents dc1d9b8 + 1915aef commit 1ea84a5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 25 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
push:
branches:
- master
- zowe-v1-lts
- zowe-v?-lts
pull_request:
branches:
- master
- zowe-v1-lts
- zowe-v?-lts

jobs:
analyze:
Expand All @@ -35,4 +35,4 @@ jobs:
config-file: ./.github/resources/codeql-config.yml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v2
21 changes: 7 additions & 14 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,20 @@ env:
GITHUB_TOKEN: ${{ secrets.ZOWE_ROBOT_TOKEN }}

jobs:
v1-lts:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Test Scripts
run: gh workflow run -r zowe-v1-lts test.yml

- name: WebHelp CI
run: gh workflow run -r zowe-v1-lts -f release=false main.yml
strategy:
fail-fast: false
matrix:
branch: ['master', 'zowe-v1-lts', 'zowe-v2-lts']

v2-lts:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Test Scripts
run: gh workflow run -r master test.yml
run: gh workflow run -r ${{ matrix.branch }} test.yml

- name: WebHelp CI
run: gh workflow run -r master -f release=false main.yml

run: gh workflow run -r ${{ matrix.branch }} -f release=false main.yml
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- master
- zowe-v1-lts
- zowe-v?-lts
pull_request_target:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:

- name: Install Node Package Dependencies
id: install-node
run: |
run: |
npm i --prod
npm install -g puppeteer-cli
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
zowe plugins install @zowe/ims-for-zowe-cli@zowe-v2-lts
zowe plugins install @zowe/mq-for-zowe-cli@zowe-v2-lts
zowe plugins install @zowe/zos-ftp-for-zowe-cli@zowe-v2-lts
- name: Get Zowe version
id: get-version
if: ${{ steps.get-version-from-workflow.outcome == 'skipped' }}
Expand All @@ -97,10 +97,10 @@ jobs:
path: |
generatedWebHelp/
zowe.pdf
- name: Prepare Release Artifacts
id: release-prepare
if: ${{ (github.ref_name == 'master' || github.ref_name == 'zowe-v1-lts') && steps.build.outcome == 'success' && github.event_name == 'workflow_dispatch' && github.event.inputs.zowe-version && github.event.inputs.zowe-version != '' && github.event.inputs.release == 'true' }}
if: ${{ github.ref_protected && steps.build.outcome == 'success' && github.event_name == 'workflow_dispatch' && github.event.inputs.zowe-version && github.event.inputs.zowe-version != '' && github.event.inputs.release == 'true' }}
run: |
mkdir release
mv zowe.pdf release/.
Expand Down Expand Up @@ -128,15 +128,15 @@ jobs:
deploy-release:
needs: test
runs-on: ubuntu-latest
if: ${{ needs.test.result == 'success' && github.event_name == 'workflow_dispatch' && (github.ref_name == 'master' || github.ref_name == 'zowe-v1-lts') && github.event.inputs.zowe-version && github.event.inputs.zowe-version != '' && github.event.inputs.release == 'true' }}
if: ${{ needs.test.result == 'success' && github.event_name == 'workflow_dispatch' && github.ref_protected && github.event.inputs.zowe-version && github.event.inputs.zowe-version != '' && github.event.inputs.release == 'true' }}
permissions:
contents: write
steps:
- name: Checkout Pages Branch
uses: actions/checkout@v4
with:
ref: 'gh-pages'

- name: Get Release Contents
env:
GITHUB_TOKEN: ${{ secrets.ZOWE_ROBOT_TOKEN }}
Expand All @@ -158,7 +158,7 @@ jobs:
deploy-artifact:
needs: test
runs-on: ubuntu-latest
if: needs.test.result == 'success' && github.event_name == 'push' && (github.ref_name == 'master' || github.ref_name == 'zowe-v1-lts')
if: needs.test.result == 'success' && github.event_name == 'push' && github.ref_protected
permissions:
contents: write
steps:
Expand Down

0 comments on commit 1ea84a5

Please sign in to comment.