[#118]: 007 🍸 release #263
Workflow file for this run
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: | |
- master | |
pull_request: | |
jobs: | |
check: | |
name: Test Action | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.10.0 | |
- name: Test the action | |
shell: bash | |
run: | | |
git config --global user.email ${{ secrets.USER_EMAIL }} | |
git config --global user.name ${{ secrets.USER_NAME }} | |
if [ ${GITHUB_EVENT_NAME} = 'push' ] | |
then | |
BRANCH_NAME=${GITHUB_REF_NAME} | |
else | |
BRANCH_NAME=${GITHUB_HEAD_REF} | |
fi | |
git clone "https://${{secrets.TOKEN}}@github.com/JacobDomagala/TestRepo.git" | |
cd TestRepo | |
python ./switch_sa_branch.py -br=$BRANCH_NAME | |
git diff --quiet && git diff --staged --quiet || git commit -am"Update branch name: ($BRANCH_NAME)" | |
git push | |
# test PR (CMake) | |
git checkout test-static-analysis | |
git commit -as --amend --no-edit | |
git push -f | |
# test PR (non CMake) | |
git checkout test-sa-without-cmake | |
git commit -as --amend --no-edit | |
git push -f | |
# test pull_request_target | |
git clone "https://${{secrets.TOKEN}}@github.com/JacobDTest/TestRepo.git" | |
cd TestRepo | |
git checkout test-branch-fork | |
git commit -as --amend --no-edit | |
git push -f | |
- name: Output results (PR) | |
if: github.event_name == 'pull_request' | |
uses: mshick/add-pr-comment@v2 | |
with: | |
message: | | |
## Test Action results | |
*** | |
### [Result for push](https://github.com/JacobDomagala/TestRepo/actions/workflows/test.yml?query=branch%3Amain) | |
*** | |
### [Result for pull_request (CMake)](https://github.com/JacobDomagala/TestRepo/pull/3#issuecomment-1404081176) | |
*** | |
### [Result for pull_request (non CMake)](https://github.com/JacobDomagala/TestRepo/pull/3#issuecomment-1404102205) | |
*** | |
### [Result for pull_request_target (CMake)](https://github.com/JacobDomagala/TestRepo/pull/7#issuecomment-1404081052) | |
*** | |
### [Result for pull_request_target (non CMake)](https://github.com/JacobDomagala/TestRepo/pull/7#issuecomment-1404101648) | |