diff --git a/.github/workflows/auto-create-pull-request.yml b/.github/workflows/auto-create-pull-request.yml index 20ce420..cf21dde 100644 --- a/.github/workflows/auto-create-pull-request.yml +++ b/.github/workflows/auto-create-pull-request.yml @@ -48,8 +48,6 @@ jobs: - name: Install Docker Buildx uses: docker/setup-buildx-action@v3 - with: - install: true - name: Install QEMU uses: docker/setup-qemu-action@v3 diff --git a/.github/workflows/auto-create-release.yml b/.github/workflows/auto-create-release.yml index 84578e6..045d2f5 100644 --- a/.github/workflows/auto-create-release.yml +++ b/.github/workflows/auto-create-release.yml @@ -6,6 +6,7 @@ on: push: branches: - release/** + workflow_dispatch: permissions: contents: write @@ -13,7 +14,9 @@ permissions: jobs: release: - if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/') + if: >- + github.event_name == 'workflow_dispatch' || + (github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')) name: Create Release runs-on: ubuntu-24.04-arm steps: @@ -35,13 +38,23 @@ jobs: run: | task lint task git:set-config - task version:tag-release - echo "REL_VERSION=$(task version:get)" >> "$GITHUB_OUTPUT" + REL_VERSION="$(task version:get)" + echo "REL_VERSION=${REL_VERSION}" >> "$GITHUB_OUTPUT" + + full_remote_sha="$(git ls-remote --tags origin "refs/tags/${REL_VERSION}" 2>/dev/null | awk '{print $1}' || true)" + if [ -n "${full_remote_sha}" ]; then + if [ "${GITHUB_EVENT_NAME}" = "workflow_dispatch" ]; then + echo "ℹ️ INFO: Full tag '${REL_VERSION}' already exists; skipping tag creation." + else + echo "❌ ERROR: Full tag '${REL_VERSION}' already exists; aborting" >&2 + exit 1 + fi + else + task version:tag-release + fi - name: Install Docker Buildx uses: docker/setup-buildx-action@v3 - with: - install: true - name: Install QEMU uses: docker/setup-qemu-action@v3 diff --git a/.github/workflows/cron-check-dependencies.yml b/.github/workflows/cron-check-dependencies.yml index 57f98ea..e676884 100644 --- a/.github/workflows/cron-check-dependencies.yml +++ b/.github/workflows/cron-check-dependencies.yml @@ -27,8 +27,6 @@ jobs: - name: Install Docker Buildx uses: docker/setup-buildx-action@v3 - with: - install: true - name: Install QEMU uses: docker/setup-qemu-action@v3 diff --git a/Taskfile.cicd.yml b/Taskfile.cicd.yml index 7e33379..2252d2e 100644 --- a/Taskfile.cicd.yml +++ b/Taskfile.cicd.yml @@ -130,7 +130,6 @@ tasks: - task version:set VERSION=v{{.NEXT_MAJOR}}.0.0 version:tag-release: - internal: true desc: Create set of git tags cmds: - |