diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 0000000..0fb9efb --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,68 @@ +name: Dependabot Auto Merge + +on: + pull_request: + types: [opened, synchronize, reopened] + +permissions: + pull-requests: write + contents: write + +jobs: + dependabot-auto-merge: + name: Auto Merge Dependabot PR + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: Fetch PR Details + id: pr + uses: actions/github-script@v7 + with: + script: | + const pr = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number, + }); + console.log('PR Status:', pr.data.state); + console.log('PR Author:', pr.data.user.login); + return pr.data; + + - name: Enable Auto-Merge (Squash) + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const pr = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number, + }); + + // Enable auto-merge using GraphQL + try { + const result = await github.graphql(` + mutation EnableAutoMerge($pullRequestId:ID!) { + enablePullRequestAutoMerge(input: { + pullRequestId: $pullRequestId + mergeMethod: SQUASH + }) { + pullRequest { + autoMergeRequest { + enabledAt + mergeMethod + } + } + } + } + `, { + pullRequestId: pr.data.node_id, + }); + + console.log('✓ Auto-merge enabled for PR #' + context.issue.number); + console.log('Merge method: SQUASH'); + } catch (error) { + // Auto-merge might already be enabled or PR might need status checks to pass first + console.log('Auto-merge setup (will auto-merge once checks pass):', error.message); + } + diff --git a/.github/workflows/prerelease-action-plugins-actions_check.yml b/.github/workflows/prerelease-action-plugins-actions_check.yml index c034356..332e91b 100644 --- a/.github/workflows/prerelease-action-plugins-actions_check.yml +++ b/.github/workflows/prerelease-action-plugins-actions_check.yml @@ -5,7 +5,8 @@ on: push: branches: [ "develop" ] paths: - - "action-plugins/actions_check/**" + - "action-plugins/actions_check/.version" + - "action-plugins/actions_check/**/*.go" jobs: check-version: @@ -22,7 +23,7 @@ jobs: working-directory: action-plugins/actions_check run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/prerelease-action-plugins-ansible.yml b/.github/workflows/prerelease-action-plugins-ansible.yml index ce80493..eadba92 100644 --- a/.github/workflows/prerelease-action-plugins-ansible.yml +++ b/.github/workflows/prerelease-action-plugins-ansible.yml @@ -5,7 +5,8 @@ on: push: branches: [ "develop" ] paths: - - "action-plugins/ansible/**" + - "action-plugins/ansible/.version" + - "action-plugins/ansible/**/*.go" jobs: check-version: @@ -22,7 +23,7 @@ jobs: working-directory: action-plugins/ansible run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/prerelease-action-plugins-collect_data.yml b/.github/workflows/prerelease-action-plugins-collect_data.yml index ffd686a..b45ca64 100644 --- a/.github/workflows/prerelease-action-plugins-collect_data.yml +++ b/.github/workflows/prerelease-action-plugins-collect_data.yml @@ -5,7 +5,8 @@ on: push: branches: [ "develop" ] paths: - - "action-plugins/collect_data/**" + - "action-plugins/collect_data/.version" + - "action-plugins/collect_data/**/*.go" jobs: check-version: @@ -22,7 +23,7 @@ jobs: working-directory: action-plugins/collect_data run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/prerelease-action-plugins-debug.yml b/.github/workflows/prerelease-action-plugins-debug.yml index 5e02af4..d53c941 100644 --- a/.github/workflows/prerelease-action-plugins-debug.yml +++ b/.github/workflows/prerelease-action-plugins-debug.yml @@ -5,7 +5,8 @@ on: push: branches: [ "develop" ] paths: - - "action-plugins/debug/**" + - "action-plugins/debug/.version" + - "action-plugins/debug/**/*.go" jobs: check-version: @@ -22,7 +23,7 @@ jobs: working-directory: action-plugins/debug run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/prerelease-action-plugins-git.yml b/.github/workflows/prerelease-action-plugins-git.yml index b791163..8b0de6c 100644 --- a/.github/workflows/prerelease-action-plugins-git.yml +++ b/.github/workflows/prerelease-action-plugins-git.yml @@ -5,7 +5,8 @@ on: push: branches: [ "develop" ] paths: - - "action-plugins/git/**" + - "action-plugins/git/.version" + - "action-plugins/git/**/*.go" jobs: check-version: @@ -22,7 +23,7 @@ jobs: working-directory: action-plugins/git run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/prerelease-action-plugins-interaction.yml b/.github/workflows/prerelease-action-plugins-interaction.yml index ccd297c..c34db56 100644 --- a/.github/workflows/prerelease-action-plugins-interaction.yml +++ b/.github/workflows/prerelease-action-plugins-interaction.yml @@ -5,7 +5,8 @@ on: push: branches: [ "develop" ] paths: - - "action-plugins/interaction/**" + - "action-plugins/interaction/.version" + - "action-plugins/interaction/**/*.go" jobs: check-version: @@ -22,7 +23,7 @@ jobs: working-directory: action-plugins/interaction run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/prerelease-action-plugins-log.yml b/.github/workflows/prerelease-action-plugins-log.yml index 61fd25c..9340589 100644 --- a/.github/workflows/prerelease-action-plugins-log.yml +++ b/.github/workflows/prerelease-action-plugins-log.yml @@ -5,7 +5,8 @@ on: push: branches: [ "develop" ] paths: - - "action-plugins/log/**" + - "action-plugins/log/.version" + - "action-plugins/log/**/*.go" jobs: check-version: @@ -22,7 +23,7 @@ jobs: working-directory: action-plugins/log run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/prerelease-action-plugins-mail.yml b/.github/workflows/prerelease-action-plugins-mail.yml index 0f2fc2a..1d702e6 100644 --- a/.github/workflows/prerelease-action-plugins-mail.yml +++ b/.github/workflows/prerelease-action-plugins-mail.yml @@ -5,7 +5,8 @@ on: push: branches: [ "develop" ] paths: - - "action-plugins/mail/**" + - "action-plugins/mail/.version" + - "action-plugins/mail/**/*.go" jobs: check-version: @@ -22,7 +23,7 @@ jobs: working-directory: action-plugins/mail run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/prerelease-action-plugins-pattern_check.yml b/.github/workflows/prerelease-action-plugins-pattern_check.yml index 77d0c15..aa6c6f5 100644 --- a/.github/workflows/prerelease-action-plugins-pattern_check.yml +++ b/.github/workflows/prerelease-action-plugins-pattern_check.yml @@ -5,7 +5,8 @@ on: push: branches: [ "develop" ] paths: - - "action-plugins/pattern_check/**" + - "action-plugins/pattern_check/.version" + - "action-plugins/pattern_check/**/*.go" jobs: check-version: @@ -22,7 +23,7 @@ jobs: working-directory: action-plugins/pattern_check run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/prerelease-action-plugins-ping.yml b/.github/workflows/prerelease-action-plugins-ping.yml index 8f6b2dc..2bbd8ed 100644 --- a/.github/workflows/prerelease-action-plugins-ping.yml +++ b/.github/workflows/prerelease-action-plugins-ping.yml @@ -5,7 +5,8 @@ on: push: branches: [ "develop" ] paths: - - "action-plugins/ping/**" + - "action-plugins/ping/.version" + - "action-plugins/ping/**/*.go" jobs: check-version: @@ -22,7 +23,7 @@ jobs: working-directory: action-plugins/ping run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/prerelease-action-plugins-port_checker.yml b/.github/workflows/prerelease-action-plugins-port_checker.yml index 6c04186..e5cf97a 100644 --- a/.github/workflows/prerelease-action-plugins-port_checker.yml +++ b/.github/workflows/prerelease-action-plugins-port_checker.yml @@ -5,7 +5,8 @@ on: push: branches: [ "develop" ] paths: - - "action-plugins/port_checker/**" + - "action-plugins/port_checker/.version" + - "action-plugins/port_checker/**/*.go" jobs: check-version: @@ -22,7 +23,7 @@ jobs: working-directory: action-plugins/port_checker run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/prerelease-action-plugins-ssh.yml b/.github/workflows/prerelease-action-plugins-ssh.yml index 4cabfda..6c06eea 100644 --- a/.github/workflows/prerelease-action-plugins-ssh.yml +++ b/.github/workflows/prerelease-action-plugins-ssh.yml @@ -5,7 +5,8 @@ on: push: branches: [ "develop" ] paths: - - "action-plugins/ssh/**" + - "action-plugins/ssh/.version" + - "action-plugins/ssh/**/*.go" jobs: check-version: @@ -22,7 +23,7 @@ jobs: working-directory: action-plugins/ssh run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/prerelease-action-plugins-terraform.yml b/.github/workflows/prerelease-action-plugins-terraform.yml index 67b2d23..c7ad4d3 100644 --- a/.github/workflows/prerelease-action-plugins-terraform.yml +++ b/.github/workflows/prerelease-action-plugins-terraform.yml @@ -5,7 +5,8 @@ on: push: branches: [ "develop" ] paths: - - "action-plugins/terraform/**" + - "action-plugins/terraform/.version" + - "action-plugins/terraform/**/*.go" jobs: check-version: @@ -22,7 +23,7 @@ jobs: working-directory: action-plugins/terraform run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/prerelease-action-plugins-test.yml b/.github/workflows/prerelease-action-plugins-test.yml index 15cbc09..f311eba 100644 --- a/.github/workflows/prerelease-action-plugins-test.yml +++ b/.github/workflows/prerelease-action-plugins-test.yml @@ -5,7 +5,8 @@ on: push: branches: [ "develop" ] paths: - - "action-plugins/test/**" + - "action-plugins/test/.version" + - "action-plugins/test/**/*.go" jobs: check-version: @@ -22,7 +23,7 @@ jobs: working-directory: action-plugins/test run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/prerelease-action-plugins-wait.yml b/.github/workflows/prerelease-action-plugins-wait.yml index ed4d4e1..2956b32 100644 --- a/.github/workflows/prerelease-action-plugins-wait.yml +++ b/.github/workflows/prerelease-action-plugins-wait.yml @@ -5,7 +5,8 @@ on: push: branches: [ "develop" ] paths: - - "action-plugins/wait/**" + - "action-plugins/wait/.version" + - "action-plugins/wait/**/*.go" jobs: check-version: @@ -22,7 +23,7 @@ jobs: working-directory: action-plugins/wait run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/prerelease-endpoint-plugins-alertmanager.yml b/.github/workflows/prerelease-endpoint-plugins-alertmanager.yml index ec6a283..2b2cdcf 100644 --- a/.github/workflows/prerelease-endpoint-plugins-alertmanager.yml +++ b/.github/workflows/prerelease-endpoint-plugins-alertmanager.yml @@ -5,7 +5,8 @@ on: push: branches: [ "develop" ] paths: - - "endpoint-plugins/alertmanager/**" + - "endpoint-plugins/alertmanager/.version" + - "endpoint-plugins/alertmanager/**/*.go" jobs: check-version: @@ -22,7 +23,7 @@ jobs: working-directory: endpoint-plugins/alertmanager run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/release-action-plugins-actions_check.yml b/.github/workflows/release-action-plugins-actions_check.yml index f4a3484..3483b84 100644 --- a/.github/workflows/release-action-plugins-actions_check.yml +++ b/.github/workflows/release-action-plugins-actions_check.yml @@ -5,7 +5,8 @@ on: push: branches: [ "main" ] paths: - - "action-plugins/actions_check/**" + - "action-plugins/actions_check/.version" + - "action-plugins/actions_check/**/*.go" jobs: build-and-release: diff --git a/.github/workflows/release-action-plugins-ansible.yml b/.github/workflows/release-action-plugins-ansible.yml index 3d00f01..8c733d8 100644 --- a/.github/workflows/release-action-plugins-ansible.yml +++ b/.github/workflows/release-action-plugins-ansible.yml @@ -5,7 +5,8 @@ on: push: branches: [ "main" ] paths: - - "action-plugins/ansible/**" + - "action-plugins/ansible/.version" + - "action-plugins/ansible/**/*.go" jobs: build-and-release: diff --git a/.github/workflows/release-action-plugins-collect_data.yml b/.github/workflows/release-action-plugins-collect_data.yml index 7063f5c..46f2b32 100644 --- a/.github/workflows/release-action-plugins-collect_data.yml +++ b/.github/workflows/release-action-plugins-collect_data.yml @@ -5,7 +5,8 @@ on: push: branches: [ "main" ] paths: - - "action-plugins/collect_data/**" + - "action-plugins/collect_data/.version" + - "action-plugins/collect_data/**/*.go" jobs: build-and-release: diff --git a/.github/workflows/release-action-plugins-debug.yml b/.github/workflows/release-action-plugins-debug.yml index 8b95148..e06ece6 100644 --- a/.github/workflows/release-action-plugins-debug.yml +++ b/.github/workflows/release-action-plugins-debug.yml @@ -5,7 +5,8 @@ on: push: branches: [ "main" ] paths: - - "action-plugins/debug/**" + - "action-plugins/debug/.version" + - "action-plugins/debug/**/*.go" jobs: build-and-release: diff --git a/.github/workflows/release-action-plugins-git.yml b/.github/workflows/release-action-plugins-git.yml index 67a1c70..8fd8f08 100644 --- a/.github/workflows/release-action-plugins-git.yml +++ b/.github/workflows/release-action-plugins-git.yml @@ -5,7 +5,8 @@ on: push: branches: [ "main" ] paths: - - "action-plugins/git/**" + - "action-plugins/git/.version" + - "action-plugins/git/**/*.go" jobs: build-and-release: diff --git a/.github/workflows/release-action-plugins-interaction.yml b/.github/workflows/release-action-plugins-interaction.yml index d019272..f4a87fc 100644 --- a/.github/workflows/release-action-plugins-interaction.yml +++ b/.github/workflows/release-action-plugins-interaction.yml @@ -5,7 +5,8 @@ on: push: branches: [ "main" ] paths: - - "action-plugins/interaction/**" + - "action-plugins/interaction/.version" + - "action-plugins/interaction/**/*.go" jobs: build-and-release: diff --git a/.github/workflows/release-action-plugins-log.yml b/.github/workflows/release-action-plugins-log.yml index 55810ca..72e4b05 100644 --- a/.github/workflows/release-action-plugins-log.yml +++ b/.github/workflows/release-action-plugins-log.yml @@ -5,7 +5,8 @@ on: push: branches: [ "main" ] paths: - - "action-plugins/log/**" + - "action-plugins/log/.version" + - "action-plugins/log/**/*.go" jobs: build-and-release: diff --git a/.github/workflows/release-action-plugins-mail.yml b/.github/workflows/release-action-plugins-mail.yml index 563101d..dec8525 100644 --- a/.github/workflows/release-action-plugins-mail.yml +++ b/.github/workflows/release-action-plugins-mail.yml @@ -5,7 +5,8 @@ on: push: branches: [ "main" ] paths: - - "action-plugins/mail/**" + - "action-plugins/mail/.version" + - "action-plugins/mail/**/*.go" jobs: build-and-release: diff --git a/.github/workflows/release-action-plugins-pattern_check.yml b/.github/workflows/release-action-plugins-pattern_check.yml index d30c0f9..eada406 100644 --- a/.github/workflows/release-action-plugins-pattern_check.yml +++ b/.github/workflows/release-action-plugins-pattern_check.yml @@ -5,7 +5,8 @@ on: push: branches: [ "main" ] paths: - - "action-plugins/pattern_check/**" + - "action-plugins/pattern_check/.version" + - "action-plugins/pattern_check/**/*.go" jobs: build-and-release: diff --git a/.github/workflows/release-action-plugins-ping.yml b/.github/workflows/release-action-plugins-ping.yml index fc733a9..880a02c 100644 --- a/.github/workflows/release-action-plugins-ping.yml +++ b/.github/workflows/release-action-plugins-ping.yml @@ -5,7 +5,8 @@ on: push: branches: [ "main" ] paths: - - "action-plugins/ping/**" + - "action-plugins/ping/.version" + - "action-plugins/ping/**/*.go" jobs: build-and-release: diff --git a/.github/workflows/release-action-plugins-port_checker.yml b/.github/workflows/release-action-plugins-port_checker.yml index a2b044e..7e7e2bd 100644 --- a/.github/workflows/release-action-plugins-port_checker.yml +++ b/.github/workflows/release-action-plugins-port_checker.yml @@ -5,7 +5,8 @@ on: push: branches: [ "main" ] paths: - - "action-plugins/port_checker/**" + - "action-plugins/port_checker/.version" + - "action-plugins/port_checker/**/*.go" jobs: build-and-release: diff --git a/.github/workflows/release-action-plugins-ssh.yml b/.github/workflows/release-action-plugins-ssh.yml index f1e4c68..f558aaf 100644 --- a/.github/workflows/release-action-plugins-ssh.yml +++ b/.github/workflows/release-action-plugins-ssh.yml @@ -5,7 +5,8 @@ on: push: branches: [ "main" ] paths: - - "action-plugins/ssh/**" + - "action-plugins/ssh/.version" + - "action-plugins/ssh/**/*.go" jobs: build-and-release: diff --git a/.github/workflows/release-action-plugins-terraform.yml b/.github/workflows/release-action-plugins-terraform.yml index 5c3ce9d..8338d83 100644 --- a/.github/workflows/release-action-plugins-terraform.yml +++ b/.github/workflows/release-action-plugins-terraform.yml @@ -5,7 +5,8 @@ on: push: branches: [ "main" ] paths: - - "action-plugins/terraform/**" + - "action-plugins/terraform/.version" + - "action-plugins/terraform/**/*.go" jobs: build-and-release: diff --git a/.github/workflows/release-action-plugins-test.yml b/.github/workflows/release-action-plugins-test.yml index 1bea806..634b296 100644 --- a/.github/workflows/release-action-plugins-test.yml +++ b/.github/workflows/release-action-plugins-test.yml @@ -5,7 +5,8 @@ on: push: branches: [ "main" ] paths: - - "action-plugins/test/**" + - "action-plugins/test/.version" + - "action-plugins/test/**/*.go" jobs: build-and-release: diff --git a/.github/workflows/release-action-plugins-wait.yml b/.github/workflows/release-action-plugins-wait.yml index 5765b73..a7dcfc7 100644 --- a/.github/workflows/release-action-plugins-wait.yml +++ b/.github/workflows/release-action-plugins-wait.yml @@ -5,7 +5,8 @@ on: push: branches: [ "main" ] paths: - - "action-plugins/wait/**" + - "action-plugins/wait/.version" + - "action-plugins/wait/**/*.go" jobs: build-and-release: diff --git a/.github/workflows/release-endpoint-plugins-alertmanager.yml b/.github/workflows/release-endpoint-plugins-alertmanager.yml index 0a081bd..605ae34 100644 --- a/.github/workflows/release-endpoint-plugins-alertmanager.yml +++ b/.github/workflows/release-endpoint-plugins-alertmanager.yml @@ -5,7 +5,8 @@ on: push: branches: [ "main" ] paths: - - "endpoint-plugins/alertmanager/**" + - "endpoint-plugins/alertmanager/.version" + - "endpoint-plugins/alertmanager/**/*.go" jobs: build-and-release: diff --git a/generate_workflows.sh b/generate_workflows.sh index 7b664b1..9d0077d 100755 --- a/generate_workflows.sh +++ b/generate_workflows.sh @@ -18,7 +18,7 @@ mkdir -p "$WORKFLOWS_DIR" # Detect if version is a pre-release (contains alpha, beta, rc, etc.) is_prerelease() { local version="$1" - if [[ "$version" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "$version" =~ -(alpha|beta|rc|a|b) ]]; then return 0 fi return 1 @@ -78,7 +78,8 @@ on: push: branches: [ "main" ] paths: - - "$type/$plugin/**" + - "$type/$plugin/.version" + - "$type/$plugin/**/*.go" jobs: build-and-release: @@ -198,7 +199,8 @@ on: push: branches: [ "develop" ] paths: - - "$type/$plugin/**" + - "$type/$plugin/.version" + - "$type/$plugin/**/*.go" jobs: check-version: @@ -215,7 +217,7 @@ jobs: working-directory: $type/$plugin run: | VERSION=$(cat .version) - if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b)([0-9]*)?$ ]]; then + if [[ "${VERSION}" =~ -(alpha|beta|rc|a|b) ]]; then echo "is_prerelease=true" >> $GITHUB_OUTPUT else echo "is_prerelease=false" >> $GITHUB_OUTPUT