Skip to content

Commit

Permalink
Update gh workflows to use new namespacing
Browse files Browse the repository at this point in the history
  • Loading branch information
ravenac95 committed Apr 5, 2024
1 parent 2028f5d commit 953d899
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/external-prs-handle-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Parse the comment to see if it's a deploy comment
id: parse_comment
run: |
cd ops/external-prs && pnpm tools parse-comment ${{ github.repository }} ${{ github.event.comment.id }} $GITHUB_OUTPUT
cd ops/external-prs && pnpm tools oso parse-comment --repo ${{ github.repository }} ${{ github.event.comment.id }} $GITHUB_OUTPUT
# - name: Deploy if the deployment is eligible
# run: |
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/refresh-test-credentials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# This workflow will run every 30 mins to hopefully ensure that credentials
# don't expire even if this script errors.
name: refresh-test-credentials
env:
PR_TOOLS_REPO: ${{ github.repository }}

# For now this only runs on a schedule once a day. Once we have made some of the
# plugin workflows more incremental we will run this on _every_ commit to main
Expand Down Expand Up @@ -54,15 +56,16 @@ jobs:
run: |
cd ops/external-prs &&
bash scripts/rotate-service-account.sh [email protected] dummy.json &&
pnpm tools refresh-gcp-credentials --secret=false ${{ github.repository }} testing dummy.json GOOGLE_TEST_DUMMY_CREDENTIALS_JSON
pnpm tools oso refresh-gcp-credentials --secret=false testing dummy.json GOOGLE_TEST_DUMMY_CREDENTIALS_JSON
# These credentials are intended to be secret
- name: Refresh credentials for the bigquery-admin user on the external-prs-app environment
shell: bash
run: |
cd ops/external-prs &&
bash scripts/rotate-service-account.sh [email protected] bigquery-admin.json &&
pnpm tools refresh-gcp-credentials ${{ github.repository }} external-prs-app bigquery-admin.json GOOGLE_BQ_ADMIN_CREDENTIALS_JSON
pnpm tools oso refresh-gcp-credentials external-prs-app bigquery-admin.json GOOGLE_BQ_ADMIN_CREDENTIALS_JSON
rebuild-docker-public-vars:
name: rebuild-docker-public-vars
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-deploy-clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ jobs:

- name: Clean up datasets that are older than 1 day
run: |
cd ops/external-ops && pnpm tools test-deploy clean --project-id ${{ vars.GOOGLE_PROJECT_ID }} opensource-observer/oso 86400
cd ops/external-ops && pnpm tools oso test-deploy clean --project-id ${{ vars.GOOGLE_PROJECT_ID }} --repo opensource-observer/oso 86400
3 changes: 2 additions & 1 deletion .github/workflows/test-deploy-owners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
# should not be set to a legitimate value for testing. This will use up API
# quota otherwise
DUNE_API_KEY: "none"
PR_TOOLS_REPO: ${{ github.repository }}

# Trigger the workflow when:
on:
Expand Down Expand Up @@ -40,7 +41,7 @@ jobs:
- name: Initialize check
run: |
cd ops/external-prs &&
pnpm tools initialize-check ${{ github.repository }} ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.user.login }}
pnpm tools oso initialize-check ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.user.login }}
- name: Author association debug
run: |
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test-deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ runs:
# - name: Evaluate if this is eligible for deployment
# id: is_eligible
# run: |
# cd ops/external-prs && pnpm tools test-deploy is-eligible $GITHUB_OUTPUT
# cd ops/external-prs && pnpm tools oso test-deploy is-eligible $GITHUB_OUTPUT

- name: checkout the PR
uses: actions/checkout@v3
Expand Down Expand Up @@ -72,6 +72,8 @@ runs:
shell: bash
run: |
mkdir -p $HOME/.dbt &&
cd ops/external-prs && pnpm tools test-deploy --project-id ${{ inputs.google_project_id }} setup ${{ github.repository }} ${{ inputs.pr }} ${{ inputs.sha }} $HOME/.dbt/profiles.yml ${{ inputs.gcp_service_account_path }} pr-clone
cd ops/external-prs && pnpm tools oso test-deploy --project-id ${{ inputs.google_project_id }} setup ${{ inputs.pr }} ${{ inputs.sha }} $HOME/.dbt/profiles.yml ${{ inputs.gcp_service_account_path }} pr-clone
env:
PR_TOOLS_REPO: ${{ github.repository }}


0 comments on commit 953d899

Please sign in to comment.