1515 required : false
1616 type : boolean
1717 default : false
18- secrets :
19- github-token :
20- description : ' GitHub token for authentication'
2118jobs :
2219 add-mapping-version :
20+ name : Add Mapping Version ${{ inputs.agent-version }} --> ${{ inputs.oss-version }}
21+ permissions :
22+ contents : read
23+ pull-requests : write
24+ id-token : write
2325 runs-on : ubuntu-latest
2426 steps :
27+ - name : Authenticate with GCP
28+ uses : google-github-actions/auth@v2
29+ with :
30+ workload_identity_provider : " projects/841522437311/locations/global/workloadIdentityPools/github-actions/providers/github-actions"
31+ service_account : " terraform-infra@infrastructure-464010.iam.gserviceaccount.com"
32+
33+ - id : get-secrets
34+ name : Get secrets from GCP Secret Manager
35+ # This step retrieves secrets from GCP Secret Manager and sets them as outputs
36+ # The secrets can then be accessed in subsequent steps using ${{ steps.get-secrets.outputs.<secret_name> }}
37+ uses : " google-github-actions/get-secretmanager-secrets@v2"
38+ with :
39+ secrets : |-
40+ github-pat:projects/626836145334/secrets/GITHUB_CI_PAT
41+
2542 - name : Checkout repository
2643 uses : actions/checkout@v4
2744 with :
2845 repository : fluentdo/documentation
29- token : ${{ secrets.github-token }}
46+ token : ${{ steps.get- secrets.outputs. github-pat }}
3047
3148 - name : Add mapping version
3249 run : |
4966 branch : ci_update-version-${{ inputs.agent-version }}
5067 delete-branch : true
5168 title : " ci: add mapping version for agent ${{ inputs.agent-version }}"
52- token : ${{ secrets.github-token }}
69+ token : ${{ steps.get- secrets.outputs. github-pat }}
5370 labels : ci,automerge
5471 body : |
5572 Mapping version added for FluentDo agent ${{ inputs.agent-version }}:
7390 # if: ${{ steps.cpr.outputs.pull-request-number }}
7491 # run: gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}"
7592 # env:
76- # GH_TOKEN: ${{ secrets.github-token }}
93+ # GH_TOKEN: ${{ steps.get- secrets.outputs. github-pat }}
0 commit comments