Skip to content

Commit

Permalink
ci: prep for update to GitHub Ubuntu runner (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts authored Nov 20, 2024
1 parent 4eace90 commit 8b302c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/pr-close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@ jobs:
name: Cleanup OpenShift
runs-on: ubuntu-22.04
steps:
- name: Install CLI tools from OpenShift Mirror
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.14.37"

- name: Remove OpenShift artifacts
run: |
oc login --token=${{ secrets.OC_TOKEN }} --server=${{ vars.OC_SERVER }}
oc project ${{ vars.OC_NAMESPACE }}
# OC Login
OC_TEMP_TOKEN=$(curl -k -X POST https://api.silver.devops.gov.bc.ca:6443/api/v1/namespaces/${{ vars.OC_NAMESPACE }}/serviceaccounts/pipeline/token --header "Authorization: Bearer ${{ secrets.OC_TOKEN }}" -d '{"spec": {"expirationSeconds": 600}}' -H 'Content-Type: application/json; charset=utf-8' | jq -r '.status.token' )
oc login --token=${OC_TEMP_TOKEN} --server=https://api.silver.devops.gov.bc.ca:6443
oc project ${{ vars.OC_NAMESPACE }} # Safeguard!
# Remove old build runs, build pods and deployment pods
oc delete all,pvc,secret -l app=${{ github.event.repository.name }}-${{ github.event.number }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# tests:
# name: Unit Tests
# if: github.event_name != 'pull_request' || !github.event.pull_request.draft
# runs-on: ubuntu-22.04
# runs-on: ubuntu-24.04
# strategy:
# matrix:
# dir: [backend]
Expand Down

0 comments on commit 8b302c9

Please sign in to comment.