Compare commits
4 Commits
v0.7.0-alp
...
v0.7.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
6777c065ee
|
|||
|
f2c4e73b8c
|
|||
|
e82cdfd00f
|
|||
|
7643662fcc
|
@@ -29,6 +29,7 @@ jobs:
|
|||||||
corepack prepare yarn@stable --activate
|
corepack prepare yarn@stable --activate
|
||||||
|
|
||||||
- name: Cache node_modules
|
- name: Cache node_modules
|
||||||
|
id: cache-node-modules
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: node_modules
|
||||||
@@ -37,6 +38,7 @@ jobs:
|
|||||||
${{ runner.os }}-node-modules-
|
${{ runner.os }}-node-modules-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
||||||
run: yarn install --immutable
|
run: yarn install --immutable
|
||||||
|
|
||||||
- name: Create env file
|
- name: Create env file
|
||||||
@@ -55,8 +57,14 @@ jobs:
|
|||||||
- name: Trigger Ansible Deploy Playbook
|
- name: Trigger Ansible Deploy Playbook
|
||||||
if: steps.build.outputs.VERSION != ''
|
if: steps.build.outputs.VERSION != ''
|
||||||
run: |
|
run: |
|
||||||
curl --fail-with-body -sS \
|
response=$(curl -sS \
|
||||||
-H "Authorization: Bearer ${{ secrets.WEBHOOK_SECRET }}" \
|
-H "Authorization: Bearer ${{ secrets.WEBHOOK_SECRET }}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{"artifact_url":"${{ gitea.server_url }}/${{ gitea.repository }}/releases/download/v${{ steps.build.outputs.VERSION }}/release-${{ steps.build.outputs.VERSION }}.tar.gz"}' \
|
-d '{"artifact_url":"${{ gitea.server_url }}/${{ gitea.repository }}/releases/download/v${{ steps.build.outputs.VERSION }}/release-${{ steps.build.outputs.VERSION }}.tar.gz"}' \
|
||||||
"${{ vars.WEBHOOK_URL }}"
|
-w "\n%{http_code}" \
|
||||||
|
"${{ vars.WEBHOOK_URL }}")
|
||||||
|
http_code=$(echo "$response" | tail -1)
|
||||||
|
body=$(echo "$response" | head -n -1)
|
||||||
|
echo "Response: $body"
|
||||||
|
echo "HTTP status: $http_code"
|
||||||
|
[ "$http_code" -ge 200 ] && [ "$http_code" -lt 300 ]
|
||||||
|
|||||||
Reference in New Issue
Block a user