Trigger branch #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) }} |