Adding upstream version 0.24.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
0b53ff4373
commit
fbd716708c
11 changed files with 955 additions and 0 deletions
57
.github/workflows/test_action.yml
vendored
Normal file
57
.github/workflows/test_action.yml
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: "${{ github.event.pull_request.head.ref }}"
|
||||
repository: "${{ github.event.pull_request.head.repo.full_name }}"
|
||||
fetch-depth: 0 # ensures that tags are fetched, seems to be needed
|
||||
- name: Capture commit id
|
||||
id: capture
|
||||
run: |
|
||||
COMMIT_ID="$(git rev-parse "${{ github.head_ref }}")"
|
||||
echo "The sha of the starting commit is $COMMIT_ID"
|
||||
echo "SHA=$COMMIT_ID" >>"$GITHUB_OUTPUT"
|
||||
- name: create test commit
|
||||
run: |
|
||||
touch test_file
|
||||
git config --global user.email "you@example.com"
|
||||
git config --global user.name "Your Name"
|
||||
git add test_file
|
||||
git commit -m "feat: test feature"
|
||||
- name: test action
|
||||
uses: ./
|
||||
with:
|
||||
github_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
commit: false
|
||||
push: false
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: "${{ github.event.pull_request.head.ref }}"
|
||||
repository: "${{ github.event.pull_request.head.repo.full_name }}"
|
||||
fetch-depth: 0 # ensures that tags are fetched, seems to be needed
|
||||
path: new_head
|
||||
- name: Test push
|
||||
run: |
|
||||
cd new_head
|
||||
last_pushed_commit="$(git rev-parse "${{ github.head_ref }}")"
|
||||
echo "Commit sha on origin: $last_pushed_commit"
|
||||
if [[ $last_pushed_commit != ${{ steps.capture.outputs.SHA }} ]]; then
|
||||
echo "Something got pushed to ${{ github.head_ref }}"
|
||||
exit 1
|
||||
fi
|
||||
- name: Test commit
|
||||
run: |
|
||||
commit_message="$(git log -1 HEAD --pretty=format:%s)"
|
||||
echo "Latest commit: $commit_message"
|
||||
if [[ $commit_message != "feat: test feature" ]]; then
|
||||
echo "The latest commit message is not 'feat: test feature'"
|
||||
exit 1
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue