lubitest/.forgejo/workflows/demo.yml

29 lines
984 B
YAML
Raw Normal View History

2024-09-17 16:48:56 +00:00
on: [pull_request]
2023-10-07 17:39:18 +00:00
jobs:
2024-06-10 18:55:49 +00:00
build:
2024-02-16 19:48:06 +00:00
runs-on: docker
2024-09-17 16:51:24 +00:00
container:
image: git.php.fail/lubiana/container/php:ci
2023-10-07 17:39:18 +00:00
steps:
2024-09-17 16:53:47 +00:00
- name: Manually checkout
env:
REPO: '${{ github.repository }}'
TOKEN: '${{ secrets.GITHUB_TOKEN }}'
GIT_SERVER: 'hannover.ccc.de/gitlab'
2024-09-17 16:55:06 +00:00
run: |
git clone --branch $GITHUB_HEAD_REF https://${TOKEN}@${GIT_SERVER}/${REPO}.git .
git fetch
git checkout $GITHUB_HEAD_REF
2024-09-17 16:48:56 +00:00
- name: lol
run: |
2024-09-17 16:51:52 +00:00
ls -l
pwd
2024-09-17 16:51:24 +00:00
output=$(cat output.txt)
2024-09-17 18:30:10 +00:00
jq -n --arg msg "\`\`\`$(cat output.txt)\\n\`\`\`" '{"body": $msg}' > /tmp/git-msg
2024-09-17 16:48:56 +00:00
echo $output
2024-09-17 18:14:54 +00:00
curl -X POST \
2024-09-17 16:48:56 +00:00
-H "Authorization: token ${GITHUB_TOKEN}" \
-H "Content-Type: application/json" \
2024-09-17 18:14:54 +00:00
-d @/tmp/git-msg \
2024-09-17 16:48:56 +00:00
"${{ env.GITHUB_SERVER_URL }}/api/v1/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"