Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: repo-ansible workflow #8309 #5

Merged
merged 1 commit into from
Dec 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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