From 07900033e6be1086970e43d08bb90b1173272fee Mon Sep 17 00:00:00 2001 From: Paliak <91493239+Paliak@users.noreply.github.com> Date: Fri, 28 Jun 2024 18:36:47 +0200 Subject: [PATCH] WIP: try using artefacts instead as cache cannot be overwritten --- .github/workflows/updatebuildlist.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/updatebuildlist.yml b/.github/workflows/updatebuildlist.yml index f895e4ba42b..c3f5e4dd0bd 100644 --- a/.github/workflows/updatebuildlist.yml +++ b/.github/workflows/updatebuildlist.yml @@ -7,23 +7,28 @@ jobs: update-builds-list: #if: github.repository == 'PathOfBuildingCommunity/PathOfBuilding' runs-on: ubuntu-22.04 + permissions: + actions: read steps: - - name: Install moreutils - run: sudo apt-get install -y moreutils - name: Checkout HEAD uses: actions/checkout@v4 - - name: Download old build list - uses: actions/cache/restore@v4 + - name: Install moreutils + run: sudo apt-get install -y moreutils + - name: Download latest build list + uses: actions/download-artifact@v4 with: + name: 'builds.txt' + github-token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.repository }} path: spec/builds.txt - key: 'builds.txt' - name: Update list run: cat spec/builds.txt <({ curl "https://pobarchives.com/api/builds?q=latest" & curl "https://pobarchives.com/api/builds?q=trending"; } | jq -r '.builds[].build_info.build_link') | sort -u | tail -n 500 | sponge spec/builds.txt - name: Print builds list run: cat spec/builds.txt - name: Save new build list - uses: actions/cache/save@v4 + uses: actions/upload-artifact@v4 with: + name: 'builds.txt' path: spec/builds.txt - key: 'builds.txt' + overwrite: true