From dbf4360c087865091775193820dae22866fab187 Mon Sep 17 00:00:00 2001 From: Wes Bonelli Date: Fri, 12 Aug 2022 14:27:33 -0400 Subject: [PATCH] ci: add job to invalidate modflow6 and flopy caches on release --- .github/workflows/release.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e64834a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,21 @@ +name: Release CI + +on: + release: + types: [created] + +jobs: + invalidate-caches: + name: Invalidate GitHub actions caches + runs-on: ubuntu-latest + steps: + - name: Invalidate Modflow6 cache + run: | + gh api --method DELETE -H "Accept: application/vnd.github+json" "/repos/MODFLOW-USGS/modflow6/actions/caches?key=modflow-exes" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Invalidate FloPy cache + run: | + gh api --method DELETE -H "Accept: application/vnd.github+json" "/repos/modflowpy/flopy/actions/caches?key=modflow-exes" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}