Update api names list #59
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
name: Update api names list | |
on: | |
workflow_dispatch: | |
jobs: | |
Update: | |
permissions: | |
contents: 'write' | |
id-token: 'write' | |
pull-requests: 'write' | |
defaults: | |
run: | |
shell: bash | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- id: 'auth' | |
name: 'Authenticate to Google Cloud' | |
uses: 'google-github-actions/auth@v1' | |
with: | |
# workload_identity_provider: "projects/102075874751/locations/global/workloadIdentityPools/gh-places-deploy-dev/providers/gh-places-dev-provider" | |
# service_account: "[email protected]" | |
workload_identity_provider: "projects/963616447866/locations/global/workloadIdentityPools/gh-deploy-dev-portal-rd/providers/gh-dev-portal-provider-rd" | |
service_account: "gha-enable-apis@premise-developer-portal-rd.iam.gserviceaccount.com" | |
# workload_identity_provider: "projects/98058317567/locations/global/workloadIdentityPools/gh-deploy-data-platform-dev/providers/gh-data-platform-dev-provider" | |
# service_account: "deploy-cloudrun-cicd@premise-data-platform-dev.iam.gserviceaccount.com" | |
- name: Set up Cloud SDK | |
uses: 'google-github-actions/setup-gcloud@v1' | |
- name: Install gcloud beta | |
run: gcloud components install beta | |
- name: Listing auths | |
run: gcloud auth list --filter=status:ACTIVE --format="value(account)" | |
- name: Python setup | |
uses: actions/setup-python@v4 | |
- name: Config gcloud | |
run: gcloud config set account [email protected]:com | |
- name: Install google api | |
run: pip install google-api-python-client | |
- name: List services | |
run: > | |
gcloud beta services list --available --format='value(NAME)' --filter="NAME:googleapis" > ./packages/backend/public/apis.txt | |
- name: Actual list files | |
run: > | |
cat ./packages/backend/public/apis.txt | |
- name: Create branch | |
run: > | |
git checkout -B new_branch;\ | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com";\ | |
git config --local user.name "github-actions[bot]";\ | |
git add ./packages/backend/public/apis.txt; git commit -m "TEST";\ | |
git push; | |