Test action
This commit is contained in:
parent
3b1a1b7bf6
commit
fb042b8914
1 changed files with 26 additions and 0 deletions
26
.gitea/workflows/nfp_moe.yaml
Normal file
26
.gitea/workflows/nfp_moe.yaml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
name: Gitea Actions Demo
|
||||||
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
nfp_moe:
|
||||||
|
runs-on: alpine
|
||||||
|
steps:
|
||||||
|
- name: Enter nfp_moe
|
||||||
|
run: cd ${{ gitea.job }}
|
||||||
|
- name: Check for new release
|
||||||
|
run: |
|
||||||
|
CURR_VER="$(cat package.json | jq -r .name)_v$(cat package.json | jq -r .version)"
|
||||||
|
CURR_NAME="$(cat package.json | jq -r .name) v$(cat package.json | jq -r .version)"
|
||||||
|
echo "Checking https://git.nfp.is/api/v1/repos/${{ gitea.repository }}/releases for name ${CURR_NAME}"
|
||||||
|
curl -s -X GET -H "Authorization: token ${{ secrets.deploytoken }}" https://git.nfp.is/api/v1/repos/${{ gitea.repository }}/releases | grep -o "\"name\"\:\"${CURR_NAME}\"" > /dev/null
|
||||||
|
|
||||||
|
if [ $? -eq 0 ] ; then
|
||||||
|
echo "Skipping ${{ gitea.job }} since $CURR_NAME already exists";
|
||||||
|
gh run cancel ${{ gitea.run_id }}
|
||||||
|
gh run watch ${{ gitea.run_id }}
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "There is new release"
|
||||||
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|
Loading…
Reference in a new issue