|
| 1 | +name: Build zss-auth workflow |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - v1.x/staging |
| 6 | + - v1.x/master |
| 7 | + - v1.x/rc |
| 8 | + pull_request: |
| 9 | + types: [opened, reopened, synchronize] |
| 10 | + |
| 11 | + workflow_dispatch: |
| 12 | + inputs: |
| 13 | + BRANCH_NAME: |
| 14 | + description: 'Specify branch name or PR (e.g. PR-41)' |
| 15 | + required: false |
| 16 | + BUILD_VERSION: |
| 17 | + description: 'Specify version you would like to build or override' |
| 18 | + required: false |
| 19 | + PERFORM_RELEASE: |
| 20 | + description: '[Release] perform release' |
| 21 | + required: false |
| 22 | + |
| 23 | +jobs: |
| 24 | + check-permission: |
| 25 | + runs-on: ubuntu-latest |
| 26 | + steps: |
| 27 | + # this action will fail the whole workflow if permission check fails |
| 28 | + - name: check permission |
| 29 | + uses: zowe-actions/shared-actions/permission-check@main |
| 30 | + with: |
| 31 | + user: ${{ github.actor }} |
| 32 | + github-repo: ${{ github.repository }} |
| 33 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 34 | + |
| 35 | + build: |
| 36 | + runs-on: ubuntu-latest |
| 37 | + needs: check-permission |
| 38 | + steps: |
| 39 | + - name: '[Prep 1] Checkout' |
| 40 | + uses: actions/checkout@v2 |
| 41 | + |
| 42 | + - name: '[Prep 2] Cache node modules' |
| 43 | + uses: actions/cache@v2 |
| 44 | + with: |
| 45 | + # npm cache files are stored in `~/.npm` on Linux/macOS |
| 46 | + path: | |
| 47 | + ~/.npm |
| 48 | + ~/.nvm/.cache |
| 49 | + ~/.nvm/versions |
| 50 | + key: ${{ runner.os }}-build-cache-node-modules-${{ hashFiles('**/package-lock.json') }} |
| 51 | + restore-keys: | |
| 52 | + ${{ runner.os }}-build-cache-node-modules- |
| 53 | + - name: '[Prep 3] Setup Node' |
| 54 | + uses: actions/setup-node@v2 |
| 55 | + with: |
| 56 | + node-version: 10.24.1 |
| 57 | + |
| 58 | + - name: '[Prep 4] Setup jFrog CLI' |
| 59 | + uses: jfrog/setup-jfrog-cli@v2 |
| 60 | + env: |
| 61 | + JF_ARTIFACTORY_1: ${{ secrets.JF_ARTIFACTORY_TOKEN }} |
| 62 | + |
| 63 | + - name: '[Prep 5] prepare workflow' |
| 64 | + uses: zowe-actions/zlux-builds/prepare-workflow@main |
| 65 | + with: |
| 66 | + github-user: ${{ secrets.ZOWE_ROBOT_USER }} |
| 67 | + github-password: ${{ secrets.ZOWE_ROBOT_TOKEN }} |
| 68 | + github-email: ${{ secrets.ZOWE_ROBOT_EMAIL }} |
| 69 | + github-branch: ${{ github.event.inputs.BRANCH_NAME }} |
| 70 | + |
| 71 | + - name: '[Prep 6] build' |
| 72 | + uses: zowe-actions/zlux-builds/zlux-plugins@main |
| 73 | + with: |
| 74 | + build-zss: false |
| 75 | + |
| 76 | + - name: '[Prep 7] packaging' |
| 77 | + uses: zowe-actions/zlux-builds/make-pax@main |
| 78 | + with: |
| 79 | + pax-ssh-username: ${{ secrets.SSH_MARIST_USERNAME }} |
| 80 | + pax-ssh-password: ${{ secrets.SSH_MARIST_RACF_PASSWORD }} |
| 81 | + pax-name: zss-auth |
| 82 | + |
| 83 | + - name: '[Prep 8] deploy ' |
| 84 | + uses: zowe-actions/zlux-builds/deploy-pax@main |
0 commit comments