Update test-action.yml #54
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 action | |
on: | |
push: | |
branches: "main" | |
paths-ignore: | |
- .gitignore | |
- README.md | |
- LICENSE | |
- .github/** | |
- "!.github/workflows/test-action.yml" | |
pull_request: | |
paths-ignore: | |
- .gitignore | |
- README.md | |
- LICENSE | |
- .github/** | |
- "!.github/workflows/test-action.yml" | |
concurrency: ${{ github.workflow }} | |
jobs: | |
branch: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions4git/setup-git@v1 | |
- run: git clone "https://x:[email protected]/actions4git/add-commit-push-test.git" . | |
env: | |
TOKEN: ${{ secrets.ADD_COMMIT_PUSH_TEST_TOKEN }} | |
- run: echo '{"sha":"${{ github.sha }}"}' > branch.json | |
- run: git add --all | |
- run: git commit --message 'Trigger branch' | |
- run: git push --force | |
tag: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions4git/setup-git@v1 | |
- run: git clone "https://x:[email protected]/actions4git/add-commit-push-test.git" . | |
env: | |
TOKEN: ${{ secrets.ADD_COMMIT_PUSH_TEST_TOKEN }} | |
- run: echo '{"sha":"${{ github.sha }}"}' > tag.json | |
- run: git add --all | |
- run: git commit --message 'Trigger tag' | |
- run: git tag --force v0.0.0 | |
- run: git push --force origin v0.0.0 | |
pull-request: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions4git/setup-git@v1 | |
- run: git clone "https://x:[email protected]/actions4git/add-commit-push-test.git" . | |
env: | |
TOKEN: ${{ secrets.ADD_COMMIT_PUSH_TEST_TOKEN }} | |
- run: echo '{"sha":"${{ github.sha }}"}' > pull-request.json | |
- run: git add --all | |
- run: git commit --message 'Trigger pull-request' | |
- run: git push --force origin main:pull-request | |
pull-request-fork: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions4git/setup-git@v1 | |
- run: git clone "https://x:[email protected]/actions4git/add-commit-push-test.git" . | |
env: | |
TOKEN: ${{ secrets.ADD_COMMIT_PUSH_TEST_TOKEN }} | |
- run: echo '{"sha":"${{ github.sha }}"}' > pull-request-fork.json | |
- run: git add --all | |
- run: git commit --message 'Trigger pull-request-fork' | |
- run: git push --force "https://x:[email protected]/actions4git/add-commit-push-test-pull-request-fork.git" main | |
env: | |
TOKEN: ${{ secrets.ADD_COMMIT_PUSH_TEST_TOKEN }} |