Skip to content

Commit

Permalink
docs: update actions and workflows documentation
Browse files Browse the repository at this point in the history
[skip ci]

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] authored and neilime committed Mar 31, 2023
1 parent 6f5c545 commit 9cb95ae
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generate-dependabot-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
- main
jobs:
main:
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected].1
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected].2
with:
# GitHub App ID to generate GitHub token in place of github-token.
# See https://github.com/tibdex/github-app-token
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/greetings.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:

jobs:
main:
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected].1
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected].2
secrets:
# Token for the repository.
# See https://github.com/actions/first-interaction#usage
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linter.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:

jobs:
main:
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected].1
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected].2
secrets:
# Token for marking the status of linter run in the Checks section.
# See https://github.com/github/super-linter#how-to-use
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:

jobs:
release:
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected].1
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected].2
with:
# Update all actions and workflows, regardless of changes.
update-all: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semantic-pull-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:

jobs:
main:
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected].1
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected].2
secrets:
# Token for the repository.
# See https://github.com/amannn/action-semantic-pull-request#installation
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:

jobs:
main:
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected].1
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected].2

# Optional customizations.
with:
Expand Down
2 changes: 1 addition & 1 deletion actions/checkout/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ permissions:
<!-- start usage -->
```yaml
- uses: hoverkraft-tech/ci-github-common/actions/[email protected].1
- uses: hoverkraft-tech/ci-github-common/actions/[email protected].2
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# See [https://github.com/actions/checkout#usage](https://github.com/actions/checkout#usage)
Expand Down
2 changes: 1 addition & 1 deletion actions/create-and-merge-pull-request/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Allow GitHub Actions to create and approve pull requests](https://docs.github.co
<!-- start usage -->

```yaml
- uses: hoverkraft-tech/ci-github-common/actions/[email protected].1
- uses: hoverkraft-tech/ci-github-common/actions/[email protected].2
with:
# GitHub token for creating and merging pull request (permissions contents: write
# and pull-requests: write). See [https://github.com/peter-evans/create-pull-request#action-inputs](https://github.com/peter-evans/create-pull-request#action-inputs)
Expand Down
26 changes: 25 additions & 1 deletion actions/create-and-merge-pull-request/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,30 @@ runs:
- name: Merge pull request
if: steps.wait-for-pull-request-mergeable-by-admin.outputs.is-mergeable
shell: bash
run: gh pr merge -R "${{ github.repository }}" --rebase --admin "${{ steps.create-pull-request.outputs.pull-request-number }}"
run: |
ATTEMPS=0
MAX_ATTEMPS=10
REQUIRED_WORKFLOWS_ERROR="Required workflow"
while [ $ATTEMPS -lt $MAX_ATTEMPS ]; do
MERGE_RESULT=$(gh pr merge -R "${{ github.repository }}" --rebase --admin "${{ steps.create-pull-request.outputs.pull-request-number }}")
MERGE_EXIT_CODE=$?
if [ "$MERGE_EXIT_CODE" = "0" ]; then
exit 0
fi
if [[ "$MERGE_RESULT" != *"$REQUIRED_WORKFLOWS_ERROR"* ]]; then
echo "::error::Failed to merge pull request: $MERGE_RESULT"
exit 1
fi
echo "::debug::Pull request is not mergeable yet, retrying in 5 seconds..."
sleep 5
ATTEMPS=$((ATTEMPS+1))
done
echo "::error::Failed to merge pull request"
exit 1
env:
GH_TOKEN: ${{ inputs.github-token }}
2 changes: 1 addition & 1 deletion actions/create-or-update-comment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Action to create or update comment in pull request or issue
<!-- start usage -->

```yaml
- uses: hoverkraft-tech/ci-github-common/actions/[email protected].1
- uses: hoverkraft-tech/ci-github-common/actions/[email protected].2
with:
# The comment title. Must be static and unique, will be used to retrieve the
# comment if exists already.
Expand Down
2 changes: 1 addition & 1 deletion actions/get-github-actions-bot-user/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Action to get the GitHub Actions bot user informations. Usefull to commit, comme
<!-- start usage -->

```yaml
- uses: hoverkraft-tech/ci-github-common/actions/[email protected].1
- uses: hoverkraft-tech/ci-github-common/actions/[email protected].2
with:
```
Expand Down
2 changes: 1 addition & 1 deletion actions/get-issue-number/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Action to get Pull request or issue number
<!-- start usage -->

```yaml
- uses: hoverkraft-tech/ci-github-common/actions/[email protected].1
- uses: hoverkraft-tech/ci-github-common/actions/[email protected].2
with:
```
Expand Down
2 changes: 1 addition & 1 deletion actions/get-matrix-outputs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Download matrix ouputs from artifacts, because GitHub action does not handle job
<!-- start usage -->

```yaml
- uses: hoverkraft-tech/ci-github-common/actions/[email protected].1
- uses: hoverkraft-tech/ci-github-common/actions/[email protected].2
with:
# The name of the artifact to download.
artifact-name: ""
Expand Down
2 changes: 1 addition & 1 deletion actions/set-matrix-output/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Set matrix ouput in file to be uploaded as artifacts, because GitHub action does
<!-- start usage -->

```yaml
- uses: hoverkraft-tech/ci-github-common/actions/[email protected].1
- uses: hoverkraft-tech/ci-github-common/actions/[email protected].2
with:
# The matrix output to set.
value: ""
Expand Down
2 changes: 1 addition & 1 deletion actions/slugify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Action to slugify a given string value
<!-- start usage -->

```yaml
- uses: hoverkraft-tech/ci-github-common/actions/[email protected].1
- uses: hoverkraft-tech/ci-github-common/actions/[email protected].2
with:
# The value to slugify
value: ""
Expand Down

0 comments on commit 9cb95ae

Please sign in to comment.