Skip to content

Commit

Permalink
Merge pull request #7 from mhitza/repo-ansible-run
Browse files Browse the repository at this point in the history
chore: repo-ansible run
  • Loading branch information
CesarScur authored Jan 11, 2024
2 parents 4b6ef7d + 7372387 commit 2b0f87e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/git/linkorb_commit.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See https://engineering.linkorb.com/topics/github-codespaces/articles/commit-standards for more information
# See https://engineering.linkorb.com/topics/git/articles/commit-standards/ for more information
#
# Write a 50-character or less commit header below
# It should take the form: <type>[scope]: <description> #<cardNumber>
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/repo-ansible.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: repo-ansible

on:
workflow_dispatch:

pull_request_target:
paths:
- 'repo.yaml'
Expand All @@ -23,10 +25,16 @@ jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- if: ${{ env.IS_PULL_REQUEST == '0' }}
uses: actions/checkout@v4
with:
path: current
ref: ${{ github.event_name == 'pull_request_target' && github.head_ref || '' }}

- if: ${{ env.IS_PULL_REQUEST == '1' }}
uses: actions/checkout@v4
with:
path: current
ref: refs/pull/${{ github.event.pull_request.number }}/merge

- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -67,8 +75,9 @@ jobs:
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "chore: repo-ansible run"
git push
if git commit -m "chore: repo-ansible run"; then
git push
fi
- if: ${{ env.IS_PULL_REQUEST == '1' && env.REPOSITORY_CHANGED == '1' }}
Expand Down

0 comments on commit 2b0f87e

Please sign in to comment.