From 7e51cf03526173a17ca83a6af174fe008f3fe003 Mon Sep 17 00:00:00 2001 From: boc-the-git <3479092+boc-the-git@users.noreply.github.com> Date: Tue, 30 Jan 2024 18:36:28 +1100 Subject: [PATCH] feat: On new release publish, update image tags in sample docker-compose files (#3072) * WIP * Add sed commands for image versions --------- Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com> --- .github/workflows/release.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0e1134963b65..78162ddcf6cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,3 +43,26 @@ jobs: uses: Ilshidur/action-discord@0.3.2 with: args: "🚀 Version {{ EVENT_PAYLOAD.release.tag_name }} of Mealie has been released. See the release notes https://github.com/mealie-recipes/mealie/releases/tag/{{ EVENT_PAYLOAD.release.tag_name }}" + + update-image-tags: + name: Update image tag in sample docker-compose files + needs: + - build-release + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎 + uses: actions/checkout@v4 + + - name: Modify version strings + run: | + sed -i 's/:v[0-9]*.[0-9]*.[0-9]*/:${{ github.event.release.tag_name }}/' docs/docs/documentation/getting-started/installation/sqlite.md + sed -i 's/:v[0-9]*.[0-9]*.[0-9]*/:${{ github.event.release.tag_name }}/' docs/docs/documentation/getting-started/installation/postgres.md + + - name: Commit updates + uses: test-room-7/action-update-file@v1 + with: + file-path: | + docs/docs/documentation/getting-started/installation/sqlite.md + docs/docs/documentation/getting-started/installation/postgres.md + commit-msg: "Change image tag, for release ${{ github.event.release.tag_name }}" + github-token: ${{ secrets.GITHUB_TOKEN }}