Skip to content

Commit

Permalink
fix(release): run download page update separately (erigontech#7112)
Browse files Browse the repository at this point in the history
Checksum not working as the file isn't available in the assets when run
in the same job.
  • Loading branch information
revitteth authored and calmbeing committed Apr 24, 2023
1 parent 3c04fdb commit ba17d31
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/download-page.yml
Original file line number Diff line number Diff line change
@@ -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 .
7 changes: 1 addition & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 3 additions & 1 deletion cmd/release/page/main.js
Original file line number Diff line number Diff line change
@@ -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"];
Expand Down

0 comments on commit ba17d31

Please sign in to comment.