Public Access
fix: derive release tag from Gitea API instead of head_branch
This commit is contained in:
1 parent
28e8c8c375
commit
0a5caab064
1 file changed
+10
-2
@@ -32,9 +32,17 @@ jobs:
|
||||
"${{ secrets.ANSIBLE_USER }}" > /tmp/inventory.ini
|
||||
|
||||
- name: Download ARM Release Artifacts
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SERVER_URL: ${{ github.server_url }}
|
||||
REPOSITORY: ${{ github.repository }}
|
||||
run: |
|
||||
TAG="${{ github.event.workflow_run.head_branch }}"
|
||||
BASE_URL="${{ github.server_url }}/${{ github.repository }}/releases/download/${TAG}"
|
||||
TAG=$(curl -sf \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
"${SERVER_URL}/api/v1/repos/${REPOSITORY}/releases?limit=1&page=1" \
|
||||
| python3 -c "import sys, json; print(json.load(sys.stdin)[0]['tag_name'])")
|
||||
echo "Deploying release tag: ${TAG}"
|
||||
BASE_URL="${SERVER_URL}/${REPOSITORY}/releases/download/${TAG}"
|
||||
wget --fail -q "${BASE_URL}/brainwave-arm64.tar.gz" || { echo "Failed to download ARM tarball from ${BASE_URL}"; exit 1; }
|
||||
wget --fail -q "${BASE_URL}/docker-compose.arm64.yml" || { echo "Failed to download docker-compose file from ${BASE_URL}"; exit 1; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user