Update forgejo release workflow
This commit is contained in:
parent
8f892ce9d2
commit
bf13427b11
1 changed files with 6 additions and 12 deletions
|
|
@ -10,7 +10,7 @@ jobs:
|
||||||
- id: build
|
- id: build
|
||||||
run: |
|
run: |
|
||||||
echo "@fontawesome:registry=https://git.serguzim.me/api/packages/fontawesome/npm/" > .npmrc
|
echo "@fontawesome:registry=https://git.serguzim.me/api/packages/fontawesome/npm/" > .npmrc
|
||||||
echo "//git.serguzim.me/api/packages/fontawesome/npm/:_authToken=${{ secrets.FORGEJO_TOKEN }}" >> .npmrc
|
echo "//git.serguzim.me/api/packages/fontawesome/npm/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
|
||||||
mkdir /tmp/release-dir
|
mkdir /tmp/release-dir
|
||||||
|
|
||||||
npm install
|
npm install
|
||||||
|
|
@ -22,7 +22,7 @@ jobs:
|
||||||
git config --global --add safe.directory ${{ github.workspace }}
|
git config --global --add safe.directory ${{ github.workspace }}
|
||||||
git archive --format=zip 'stash@{0}' -o /tmp/release-dir/reitanlage-oranienburg-${{ github.ref_name }}.zip --prefix=reitanlage-oranienburg/
|
git archive --format=zip 'stash@{0}' -o /tmp/release-dir/reitanlage-oranienburg-${{ github.ref_name }}.zip --prefix=reitanlage-oranienburg/
|
||||||
shell: bash
|
shell: bash
|
||||||
- uses: https://code.forgejo.org/actions/forgejo-release@v1
|
- uses: https://code.forgejo.org/actions/forgejo-release@v2
|
||||||
with:
|
with:
|
||||||
direction: upload
|
direction: upload
|
||||||
release-dir: /tmp/release-dir
|
release-dir: /tmp/release-dir
|
||||||
|
|
@ -32,17 +32,11 @@ jobs:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
needs: build-artifacts
|
needs: build-artifacts
|
||||||
steps:
|
steps:
|
||||||
- name: Prepare deploy script
|
- id: Run deploy webhook
|
||||||
run: |
|
|
||||||
cat <<EOF > script.sh
|
|
||||||
cd /var/www/html
|
|
||||||
bin/gpm direct-install -y \
|
|
||||||
"https://git.serguzim.me/serguzim/reitanlage-oranienburg/releases/download/${{ github.ref_name }}/reitanlage-oranienburg-${{ github.ref_name }}.zip"
|
|
||||||
- id: deploy
|
|
||||||
run: |
|
run: |
|
||||||
curl -vLX POST \
|
curl -vLX POST \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-H "X-Webhook-Token: ${{ secrets.DEPLOY_WEBHOOK_TOKEN }}" \
|
-H "X-Auth-Token: ${{ secrets.DEPLOY_WEBHOOK_TOKEN }}" \
|
||||||
-d "{\"data\": \"$(base64 -w0 script.sh)\"}" \
|
-d '{"theme_version": "${{ github.ref_name }}"}' \
|
||||||
https://deploy.serguzim.me/hooks/deploy-reitanlage_oranienburg
|
"${{ secrets.DEPLOY_WEBHOOK_URL }}"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue