From 9c38bf8010320bb5aed95009386fc91347b7d61f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20van=20Br=C3=BCgge?= Date: Sat, 6 Jul 2024 11:15:24 +0100 Subject: [PATCH] ci: Provide geonames database as GitHub release asset --- .github/workflows/docker.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 659c39b029abe..44086cb710772 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -14,6 +14,7 @@ concurrency: cancel-in-progress: true permissions: + contents: write packages: write jobs: @@ -119,6 +120,7 @@ jobs: with: context: ${{ matrix.context }} file: ${{ matrix.file }} + load: ${{ github.event_name == 'release' }} platforms: ${{ matrix.platforms }} # Skip pushing when PR from a fork push: ${{ !github.event.pull_request.head.repo.fork }} @@ -132,3 +134,16 @@ jobs: BUILD_IMAGE=${{ github.event_name == 'release' && github.ref_name || steps.metadata.outputs.tags }} BUILD_SOURCE_REF=${{ github.ref_name }} BUILD_SOURCE_COMMIT=${{ github.sha }} + + - name: Extract geodata + if: ${{ github.event_name == 'release' && matrix.image == 'immich-server' }} + run: | + id="$(docker create ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}:${{ github.ref_name }})" + docker cp "$id":/usr/bin/resources geodata + zip -r geodata.zip geodata + + - name: Upload geodata as release asset + if: ${{ github.event_name == 'release' && matrix.image == 'immich-server' }} + uses: softprops/action-gh-release@v2 + with: + files: geodata.zip