Skip to content

Commit 0ed0d05

Browse files
Start creating a github token using a token policy
1 parent a6aed9e commit 0ed0d05

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/merge-upstream-test.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,23 @@ jobs:
1414
actions: write
1515
runs-on: ubuntu-latest
1616
steps:
17+
# TokenPolicy defined at https://github.com/elastic/catalog-info/tree/main/resources/github-token-policies/token-policy-opentelemetry-demo-merge-upstream.yaml
18+
- name: Get token
19+
id: get_token
20+
uses: elastic/oblt-actions/github/create-token@v1
21+
with:
22+
token-policy: token-policy-3898141dfcd9
23+
1724
- name: Checkout
18-
uses: actions/checkout@v4
25+
uses: actions/checkout@v6
1926
with:
2027
ref: main
2128
fetch-depth: 0
29+
30+
- name: Configure git user
31+
uses: elastic/oblt-actions/git/setup@v1
32+
with:
33+
github-token: ${{ steps.get_token.outputs.token }}
2234

2335
- name: Fetch upstream
2436
run: |
@@ -45,7 +57,7 @@ jobs:
4557
if: steps.check.outputs.commits_behind != '0'
4658
id: create_pr
4759
env:
48-
GH_TOKEN: ${{ secrets.OTEL_DEMO_MERGE_SECRET }}
60+
GH_TOKEN: ${{ steps.get_token.outputs.token }}
4961
run: |
5062
PR_URL=$(gh pr create \
5163
--title "chore: merge with upstream opentelemetry-demo" \

0 commit comments

Comments
 (0)