-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
071476e
commit 7f816fa
Showing
1 changed file
with
4 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
types: [ closed, opened, synchronize, reopened ] | ||
|
@@ -14,33 +12,12 @@ on: | |
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Checkout Pull Request | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
PR_URL="${{ github.event.issue.pull_request.url }}" | ||
PR_NUM=${PR_URL##*/} | ||
echo "Checking out from PR #$PR_NUM based on URL: $PR_URL" | ||
hub pr checkout $PR_NUM | ||
if: github.event_name == 'issue_comment' | ||
|
||
- id: 'auth' | ||
uses: 'google-github-actions/auth@v1' | ||
- name: digger run | ||
uses: diggerhq/[email protected] | ||
with: | ||
credentials_json: '${{ secrets.GCP_CREDENTIALS }}' | ||
|
||
- name: 'Set up Cloud SDK' | ||
uses: 'google-github-actions/setup-gcloud@v1' | ||
|
||
- name: 'Use gcloud CLI' | ||
run: 'gcloud info' | ||
|
||
- name: digger tfrun | ||
uses: diggerhq/tfrun@main | ||
setup-google-cloud: true | ||
google-auth-credentials: '${{ secrets.GCP_CREDENTIALS }}' | ||
env: | ||
LOCK_PROVIDER: gcp | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
|