Skip to content

Commit

Permalink
Merge pull request #4 from rainstormy-actions/spdiswal/repair-major-t…
Browse files Browse the repository at this point in the history
…ag-action

Use --force when pushing major tags
spdiswal authored Aug 11, 2024
2 parents ecf8823 + 6a1e69d commit 73fe3aa
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ jobs:
has-standardised-commit-messages:
name: Has standardised commit messages
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request' && github.event.pull_request.merged == false
runs-on: ubuntu-24.04
timeout-minutes: 1
permissions:
4 changes: 2 additions & 2 deletions .github/workflows/release-tags.yml
Original file line number Diff line number Diff line change
@@ -38,15 +38,15 @@ concurrency:
jobs:
quality-assurance:
name: Quality assurance
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/')
if: github.event_name != 'pull_request' || (github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/'))
permissions:
contents: read # Allow the job to call the reusable `ci.yml` workflow.
pull-requests: read # `ci.yml` requires `pull-requests` read permissions.
uses: ./.github/workflows/ci.yml

tags:
name: Tags
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/')
if: github.event_name != 'pull_request' || (github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/'))
needs: quality-assurance
runs-on: ubuntu-24.04
timeout-minutes: 1
2 changes: 1 addition & 1 deletion major-tag/action.yml
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ runs:
MAJOR_VERSION=$(echo "$VERSION" | cut -d '.' -f 1)
git tag --force --annotate --message "Release $VERSION" "v$MAJOR_VERSION"
git push "$REMOTE" "v$MAJOR_VERSION" --force-with-lease
git push "$REMOTE" "v$MAJOR_VERSION" --force
env:
RAW_VERSION: ${{ inputs.version }}
shell: bash

0 comments on commit 73fe3aa

Please sign in to comment.