-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.05 KB
/
test-branch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Test branch
on:
push:
branches: "main"
paths: branch.json
concurrency: ${{ github.workflow }}
jobs:
test-branch:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: get-sha
run: |
sha=$(jq -r .sha branch.json)
echo "sha=$sha" >> "$GITHUB_OUTPUT"
- run: |
shopt -s dotglob nullglob
rm -rf ./*
- uses: actions/checkout@v4
with:
repository: actions4git/add-commit-push
ref: ${{ steps.get-sha.outputs.sha }}
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
- run: npm ci
- run: npm run build
- run: |
shopt -s dotglob nullglob
mkdir -p ../temp
mv ./* ../temp/
- uses: actions/checkout@v4
- run: echo $RANDOM > README.txt
- id: main
uses: ./../temp
with:
commit-message: From test-branch
- shell: jq -C . {0}
run: ${{ toJSON(steps.main.outputs) }}