Skip to content

Commit

Permalink
Merge branch 'main' into bump-testio-version
Browse files Browse the repository at this point in the history
  • Loading branch information
jreimone authored Nov 16, 2023
2 parents ccfaa52 + 5db3144 commit 1cd04f8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 15 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/template_automerge_dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Dependabot Auto-Merge

on:
workflow_call:
inputs:
force:
default: false
required: false
type: boolean
secrets:
app_id:
required: true
Expand Down Expand Up @@ -35,7 +40,12 @@ jobs:
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
run: |
gh pr review --approve "$PR_URL"
gh pr merge --auto --merge "$PR_URL"
if [ ${{ inputs.force }} == 'true' ]; then
gh pr merge "$PR_URL" --squash --admin
else
gh pr merge --auto --merge "$PR_URL"
fi
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
37 changes: 23 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
<action name>:
uses: Staffbase/gha-workflows/.github/workflows/template_*.yml@v3.2.0
uses: Staffbase/gha-workflows/.github/workflows/template_*.yml@v3.3.1
with:
...
```
Expand All @@ -29,15 +29,24 @@ In this section you can find examples of how to use template workflows. For more
<summary>The action can be used to auto-merge a dependabot PR with minor and patch updates.</summary>
The action is called by creating a PR. It is necessary that the repository is enabled for auto-merge.
Afterward the PR will be merged with the help of the merge queue if all required conditions of the repository are fulfilled.
⚠️ You can also force a merge of a PR. This means that the PR will immediately be merged.
If you want to enable the force merge, make sure that the app can bypass any protection rules.
```yml
name: Enable Dependabot Auto-Merge

on: pull_request
on:
pull_request:
types: [opened]

jobs:
dependabot:
uses: Staffbase/gha-workflows/.github/workflows/[email protected]
uses: Staffbase/gha-workflows/.github/workflows/[email protected]
with:
# optional: ⚠️ only enable the force merge if you want to do the merge just now
force: true
secrets:
# identifier of the GitHub App for authentication
app_id: ${{ <your-app-id> }}
Expand All @@ -63,7 +72,7 @@ on:

jobs:
autodev:
uses: Staffbase/gha-workflows/.github/workflows/template_autodev.yml@v3.2.0
uses: Staffbase/gha-workflows/.github/workflows/template_autodev.yml@v3.3.1
with:
# optional: base branch from which the history originates, default: main
base: master
Expand Down Expand Up @@ -104,7 +113,7 @@ on: [ push ]

jobs:
gitops:
uses: Staffbase/gha-workflows/.github/workflows/template_gitops.yml@v3.2.0
uses: Staffbase/gha-workflows/.github/workflows/template_gitops.yml@v3.3.1
with:
# optional: list of build-time variables
docker-build-args: |
Expand Down Expand Up @@ -160,7 +169,7 @@ on:

jobs:
jira_annotate:
uses: Staffbase/gha-workflows/.github/workflows/template_jira_tagging.yml@v3.2.0
uses: Staffbase/gha-workflows/.github/workflows/template_jira_tagging.yml@v3.3.1
with:
# optional: name of the service to add as label, default: name of the repository
name: 'component name'
Expand Down Expand Up @@ -192,7 +201,7 @@ on:

jobs:
ld_code_references:
uses: Staffbase/gha-workflows/.github/workflows/template_launchdarkly_code_references.yml@v3.2.0
uses: Staffbase/gha-workflows/.github/workflows/template_launchdarkly_code_references.yml@v3.3.1
with:
# optional: key of the LD project, default: default
project-key: 'my-project'
Expand Down Expand Up @@ -220,7 +229,7 @@ on:
jobs:
update_release_draft:
uses: Staffbase/gha-workflows/.github/workflows/template_release_drafter.yml@v3.2.0
uses: Staffbase/gha-workflows/.github/workflows/template_release_drafter.yml@v3.3.1
with:
# optional: name of the release
name: Version X.Y.Z
Expand Down Expand Up @@ -251,7 +260,7 @@ on:
jobs:
new_version:
uses: Staffbase/gha-workflows/.github/workflows/template_release_version.yml@v3.2.0
uses: Staffbase/gha-workflows/.github/workflows/template_release_version.yml@v3.3.1
```

You could use the action in combination with the reusable release drafter.
Expand All @@ -278,7 +287,7 @@ on: [pull_request]
jobs:
trufflehog:
uses: Staffbase/gha-workflows/.github/workflows/template_secret_scan.yml@v3.2.0
uses: Staffbase/gha-workflows/.github/workflows/template_secret_scan.yml@v3.3.1
```
</details>

Expand All @@ -296,7 +305,7 @@ on:
jobs:
stale:
uses: Staffbase/gha-workflows/.github/workflows/template_stale.yml@v3.2.0
uses: Staffbase/gha-workflows/.github/workflows/template_stale.yml@v3.3.1
with:
# optional: comment on the stale pull request while closed, default: This stale PR was closed because there was no activity.
close-pr-message: your message
Expand Down Expand Up @@ -332,7 +341,7 @@ on:
jobs:
techdocs:
uses: Staffbase/gha-workflows/.github/workflows/template_techdocs.yml@v3.2.0
uses: Staffbase/gha-workflows/.github/workflows/template_techdocs.yml@v3.3.1
with:
# optional: kind of the Backstage entity, default: Component
# ref: https://backstage.io/docs/features/software-catalog/descriptor-format#contents
Expand Down Expand Up @@ -363,7 +372,7 @@ on:
jobs:
trigger-testio-test:
uses: Staffbase/gha-workflows/.github/workflows/template_testio_trigger_test.yml@v3.2.0
uses: Staffbase/gha-workflows/.github/workflows/template_testio_trigger_test.yml@v3.3.1
with:
# optional: the slug you received from TestIO, defaults to 'staffbase'
testio-slug: your TestIO slug
Expand Down Expand Up @@ -395,7 +404,7 @@ on:
jobs:
yamllint:
uses: Staffbase/gha-workflows/.github/workflows/template_yaml.yml@v3.2.0
uses: Staffbase/gha-workflows/.github/workflows/template_yaml.yml@v3.3.1
with:
# optional: name of the running action, default: yamllint / yamllint
action-name: your name
Expand Down

0 comments on commit 1cd04f8

Please sign in to comment.