Skip to content

Commit 633d568

Browse files
committed
ci: Store AppMap archives on dedicated branch apppmap-archive
1 parent 6a6c327 commit 633d568

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ jobs:
77
steps:
88
- name: Checkout step
99
uses: actions/checkout@v3
10-
- name: Save current revision
11-
run: git_revision=$(git rev-parse HEAD)
1210
- name: Install dependencies
1311
run: yarn install
1412
- name: Build
@@ -20,15 +18,17 @@ jobs:
2018
- name: Create AppMaps archive
2119
# AppMap tools are installed to /tmp/appmap by the smoke test
2220
run: /tmp/appmap archive
23-
- name: Checkout appmap-archive branch
24-
run: git fetch && git checkout appmap-archive
2521
- name: Commit changes
26-
uses: EndBug/add-and-commit@v7
27-
with:
28-
add: .appmap
29-
push: true
30-
- name: Checkout appmap-archive branch
31-
run: git checkout $git_revision
22+
run: |
23+
git_revision=$(git rev-parse HEAD)
24+
git fetch
25+
git checkout appmap-archive
26+
git config user.email "github-actions[bot]@users.noreply.github.com"
27+
git config user.name "github-actions[bot]"
28+
git add .appmap
29+
git commit -m "chore: AppMaps for $GITHUB_REF"
30+
git push origin appmap-archive
31+
git checkout $git_revision
3232
- name: Store AppMaps archive as an artifact
3333
uses: actions/upload-artifact@v2
3434
with:
@@ -42,3 +42,6 @@ jobs:
4242
- name: Commit changes
4343
# If you forgot to package the distribution, you'll see a commit added to your PR
4444
uses: EndBug/add-and-commit@v7
45+
with:
46+
add: dist
47+
message: 'chore: Packaged distribution of the GitHub action'

0 commit comments

Comments
 (0)