Skip to content

Commit

Permalink
chore(ci): use official RH oc setup action (#91)
Browse files Browse the repository at this point in the history
Co-authored-by: Paulo Gomes da Cruz Junior <paulo.cruz@gov.bc.ca>
  • Loading branch information
DerekRoberts and paulushcgcj authored Sep 26, 2024
1 parent cd0fdf0 commit 4987ca2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/pr-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Install CLI tools from OpenShift Mirror
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4"

- name: Remove OpenShift artifacts
run: |
oc login --token=${{ secrets.OC_TOKEN }} --server=${{ vars.OC_SERVER }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ concurrency:

jobs:
deploys:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 10
outputs:
backend: ${{ steps.trigger.outputs.backend }}
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:

results:
name: Results
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: [deploys]
steps:
- run: |
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Deploy a single template. Multiple GitHub secrets are used.
```yaml
deploys:
name: Deploys
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Deploys
uses: bcgov-nr/action-deployer-openshift.yml@main
Expand All @@ -126,7 +126,7 @@ Deploy multiple templates in parallel. Runs on pull requests (PRs).
```yaml
deploys:
name: Deploys
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
matrix:
name: [backend, database, frontend, init]
Expand Down Expand Up @@ -170,7 +170,7 @@ Deploy and run a command (post hook). Matrix values reference `post_rollout`, `
```yaml
deploys:
name: Deploys
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
matrix:
name: [database, frontend]
Expand Down Expand Up @@ -205,7 +205,7 @@ Deploy a template and set the after deployment check to hit the **/health** endp
```yaml
deploys:
name: Deploys
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Deploys
uses: bcgov-nr/action-deployer-openshift.yml@main
Expand Down
14 changes: 4 additions & 10 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,10 @@ runs:
diff_branch: ${{ inputs.diff_branch }}

# Override OpenShift version, if specified
- name: Override OpenShift version
if: ${{ inputs.oc_version }}
env:
OC: https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable-${{ inputs.oc_version }}/openshift-client-linux.tar.gz
shell: bash
working-directory: /usr/local/bin/
run: |
# Override default OpenShift version (retry, resume)
(wget ${{ env.OC }} -qcO - | tar -xzvf - oc)|| !!
oc version
- name: Install CLI tools from OpenShift Mirror
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: ${{ inputs.oc_version || '4' }}

# Process variables and inputs
# Remote/override repo is required if one has been specified (input)
Expand Down

0 comments on commit 4987ca2

Please sign in to comment.