From 00987409ee91e193a7f12f982fde85b19d9993f8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Feb 2026 12:51:54 +0000 Subject: [PATCH] Create GH releases on tag push, update deprecated workflow components - main.yml: Trigger on tag pushes (noble-*, jammy-*) instead of manual release published events - main.yml: Add step to create GitHub release after image build+push - main.yml: Add contents:write + packages:write permissions - main.yml: Update docker/build-push-action from v5 to v6 - scheduled-build.yml: Update docker/build-push-action from v5 to v6 - stale.yml: Remove deprecated repo-token parameter Co-authored-by: samip5 <1703002+samip5@users.noreply.github.com> --- .github/workflows/main.yml | 24 ++++++++++++++++++++---- .github/workflows/scheduled-build.yml | 2 +- .github/workflows/stale.yml | 1 - 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e749661..81c024b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,12 +2,18 @@ name: Release on: workflow_dispatch: - release: - types: [published] + push: + tags: + - 'noble-*' + - 'jammy-*' + +permissions: + contents: write + packages: write + jobs: build: runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, '[ci-skip]')" steps: - name: Checkout uses: actions/checkout@v4 @@ -76,7 +82,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and Push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: builder: ${{ steps.buildx.outputs.name }} context: image @@ -84,3 +90,13 @@ jobs: push: ${{ steps.prep.outputs.push }} tags: ${{ steps.prep.outputs.tags }} build-args: BASE_IMAGE=${{ steps.prep.outputs.base_image }} + + - name: Create GitHub Release + if: startsWith(github.ref, 'refs/tags/') + run: | + gh release create "${{ github.ref_name }}" \ + --repo "${{ github.repository }}" \ + --title "${{ github.ref_name }}" \ + --generate-notes + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/scheduled-build.yml b/.github/workflows/scheduled-build.yml index a4beae7..1063379 100644 --- a/.github/workflows/scheduled-build.yml +++ b/.github/workflows/scheduled-build.yml @@ -81,7 +81,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and Push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: image platforms: ${{ steps.prep.outputs.platforms }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index d6068b9..6f2058b 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -9,7 +9,6 @@ jobs: steps: - uses: actions/stale@v9 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: 'This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.' stale-pr-message: 'This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution.' close-issue-message: 'Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.'