From 4e5a6bdb53443ea0e1580eaf5f8bccaea375f58c Mon Sep 17 00:00:00 2001 From: "Charles P." Date: Sat, 6 Jul 2024 18:41:55 +0200 Subject: [PATCH] Update actions/upload-artifact to v4 and remove hardcoded alpine runner --- .forgejo/workflows/main.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.forgejo/workflows/main.yml b/.forgejo/workflows/main.yml index cf91004..9b9c38b 100644 --- a/.forgejo/workflows/main.yml +++ b/.forgejo/workflows/main.yml @@ -10,13 +10,7 @@ on: jobs: cache: runs-on: docker - container: - image: 'alpine:latest' steps: - - name: Install curl - run: | - apk add --no-cache curl - - name: Download OSM data run: | curl -L -o osm.pbf \ @@ -37,13 +31,21 @@ jobs: output_file: competences-territoriales.geojson - name: Upload as artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: competences-territoriales + path: competences-territoriales.geojson - name: Upload to Forgejo Package Registry run: | curl --user ${{ secrets.USERNAME }}:${{ secrets.PAT }} \ --upload-file competences-territoriales.geojson \ --fail \ - https://forgejo.almanach.altearn.xyz/api/packages/aeris/generic/competences-territoriales-police-france/$(date +%Y-%m-%d)/competences-territoriales.geojson \ No newline at end of file + https://forgejo.almanach.altearn.xyz/api/packages/aeris/generic/competences-territoriales-police-france/$(date +%Y-%m-%d)/competences-territoriales.geojson && \ + curl --user ${{ secrets.USERNAME }}:${{ secrets.PAT }} \ + --request DELETE \ + https://forgejo.almanach.altearn.xyz/api/packages/aeris/generic/competences-territoriales-police-france/latest/competences-territoriales.geojson && \ + curl --user ${{ secrets.USERNAME }}:${{ secrets.PAT }} \ + --request POST \ + --fail \ + https://forgejo.almanach.altearn.xyz/api/packages/aeris/generic/competences-territoriales-police-france/latest/competences-territoriales.geojson \ No newline at end of file