From 6a3706aaa5c6c8a49f00dce99f9003acd52ad90b Mon Sep 17 00:00:00 2001 From: ondj <19149300+ondj@users.noreply.github.com> Date: Wed, 23 Sep 2026 11:25:48 +0200 Subject: [PATCH 1/2] ci: Automatically release new image version when new MISP is released --- .github/workflows/check-misp-version.yml | 46 ++++++++++++++++++++++++ .github/workflows/docker-image.yml | 13 +++---- MISP_VERSION | 1 + 3 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/check-misp-version.yml create mode 100644 MISP_VERSION diff --git a/.github/workflows/check-misp-version.yml b/.github/workflows/check-misp-version.yml new file mode 100644 index 0000000..11405a8 --- /dev/null +++ b/.github/workflows/check-misp-version.yml @@ -0,0 +1,46 @@ +name: Check External Release +on: + schedule: + - cron: '0 0 * * 1' + workflow_dispatch: + +jobs: + check-release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Get latest release + id: release + uses: actions/github-script@v7 + with: + result-encoding: string + script: | + const { data: release } = await github.rest.repos.getLatestRelease({ + owner: 'MISP', + repo: 'MISP' + }); + return release.tag_name; + + - name: Compare with stored version + id: compare + run: | + LAST_VERSION=$(cat MISP_VERSION 2>/dev/null || echo "") + NEW_VERSION="${{ steps.release.outputs.result }}" + echo "last_version=$LAST_VERSION" >> $GITHUB_OUTPUT + echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT + if [ "$LAST_VERSION" != "$NEW_VERSION" ]; then + echo "changed=true" >> $GITHUB_OUTPUT + echo "New MISP release detected: $NEW_VERSION" + echo "$NEW_VERSION" > MISP_VERSION + else + echo "changed=false" >> $GITHUB_OUTPUT + fi + + - name: Commit version file + if: steps.compare.outputs.changed == 'true' + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: 'Update MISP version to ${{ steps.compare.outputs.new_version }}' + file_pattern: MISP_VERSION \ No newline at end of file diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 64b3517..2c8cedf 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -5,12 +5,6 @@ on: branches: [ main ] pull_request: branches: [ main ] - workflow_dispatch: - inputs: - misp_ref: - description: 'MISP branch or tag to build' - required: true - default: 'develop' env: REGISTRY_IMAGE: ghcr.io/nukib/misp @@ -33,8 +27,11 @@ jobs: uses: docker/setup-buildx-action@v4 - name: Fetch variables - run: for v in $(python3 .github/workflows/docker-version.py ${{ github.event.inputs.misp_ref }}); do echo $v >> $GITHUB_ENV; done - id: variables + run: | + MISP_VERSION=$(cat MISP_VERSION) + for v in $(python3 .github/workflows/docker-version.py ${MISP_VERSION}); + do echo $v >> $GITHUB_ENV; + done - name: Cache Docker layers uses: actions/cache@v6 diff --git a/MISP_VERSION b/MISP_VERSION new file mode 100644 index 0000000..c953383 --- /dev/null +++ b/MISP_VERSION @@ -0,0 +1 @@ +v2.5.47 \ No newline at end of file From a32e6fef5dd2d909b6634ba6ac95445594704622 Mon Sep 17 00:00:00 2001 From: ondj <19149300+ondj@users.noreply.github.com> Date: Fri, 16 Oct 2026 16:23:11 +0200 Subject: [PATCH 2/2] Update MISP version to v2.5.50 --- MISP_VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MISP_VERSION b/MISP_VERSION index c953383..c32614e 100644 --- a/MISP_VERSION +++ b/MISP_VERSION @@ -1 +1 @@ -v2.5.47 \ No newline at end of file +v2.5.50 \ No newline at end of file