fix(release): run download page update separately (#7112)

Checksum not working as the file isn't available in the assets when run
in the same job.
This commit is contained in:
Max Revitt 2023-03-16 03:40:42 +00:00 committed by GitHub
parent 59bc028762
commit 87c958b5c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 7 deletions

21
.github/workflows/download-page.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Trigger After Release
on:
workflow_run:
workflows: ["release"]
types:
- completed
jobs:
after_release:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Publish downloads
run: |
cd cmd/release
docker buildx build --push --platform linux/amd64 --build-arg GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" -t thorax/download:latest .

View File

@ -52,9 +52,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.prepare.outputs.tag_name }}
DOCKER_USERNAME: ${{ secrets.DOCKERHUB }}
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_KEY }}
- name: Publish downloads
run: |
cd cmd/release
docker buildx build --push --platform linux/amd64 --build-arg GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" -t thorax/download:latest .
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_KEY }}

View File

@ -1,4 +1,6 @@
fetch("./data.json")
const cacheBuster = Math.floor(new Date().getTime() / (1000 * 60 * 5));
fetch("./data.json?cacheBuster=" + cacheBuster)
.then((response) => response.json())
.then((data) => {
const osList = ["linux", "darwin", "windows", "docker"];