Skip to content

Commit 0eff475

Browse files
committed
test: app-push smoketest workflow (throwaway)
1 parent bc46e13 commit 0eff475

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# THROWAWAY: verifies the mfc-map-bot app token can push to protected master
2+
# (persist-credentials:false + ruleset Integration bypass) without running the
3+
# full coverage SLURM job. Delete this workflow + branch after confirming.
4+
name: 'App Push Smoketest'
5+
on:
6+
push:
7+
branches: [app-push-smoketest]
8+
workflow_dispatch:
9+
permissions:
10+
contents: read
11+
jobs:
12+
smoketest:
13+
if: github.repository == 'MFlowCode/MFC'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
ref: master
19+
persist-credentials: false
20+
- name: Generate app token
21+
id: app-token
22+
uses: actions/create-github-app-token@v3
23+
with:
24+
app-id: ${{ secrets.MAP_BOT_APP_ID }}
25+
private-key: ${{ secrets.MAP_BOT_APP_PRIVATE_KEY }}
26+
- name: Push a tiny commit to master via the app token
27+
env:
28+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
29+
run: |
30+
git config user.name "mfc-map-bot[bot]"
31+
git config user.email "mfc-map-bot[bot]@users.noreply.github.com"
32+
echo "app-push smoketest at $(date -u +%Y-%m-%dT%H:%M:%SZ)" > .github/app-push-smoketest.txt
33+
git add .github/app-push-smoketest.txt
34+
git commit --no-verify -m "test: app-push smoketest (delete me) [skip ci]"
35+
git push "https://x-access-token:${GH_TOKEN}@github.com/MFlowCode/MFC.git" HEAD:master

0 commit comments

Comments
 (0)