WF
This commit is contained in:
parent
e52dd79bd5
commit
cd0f1f69b9
20
.github/workflows/move-to-main-repo.yaml
vendored
20
.github/workflows/move-to-main-repo.yaml
vendored
@ -17,11 +17,15 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Generate a token
|
- name: Generate a token
|
||||||
id: generate-token
|
id: app-token
|
||||||
uses: actions/create-github-app-token@v1
|
uses: actions/create-github-app-token@v1
|
||||||
with:
|
with:
|
||||||
app-id: ${{ vars.MAIN_APP_ID }}
|
app-id: ${{ vars.MAIN_APP_ID }}
|
||||||
private-key: ${{ secrets.MAIN_APP_PRIVATE_KEY }}
|
private-key: ${{ secrets.MAIN_APP_PRIVATE_KEY }}
|
||||||
|
owner: community-scripts
|
||||||
|
repositories: |
|
||||||
|
ProxmoxVE
|
||||||
|
ProxmoxVED
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -70,14 +74,18 @@ jobs:
|
|||||||
echo "files_found=false" >> $GITHUB_ENV
|
echo "files_found=false" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Configure Git user
|
- name: Get GitHub App User ID
|
||||||
run: |
|
id: get-user-id
|
||||||
git config --global user.email "github-actions@github.com"
|
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
|
||||||
git config --global user.name "GitHub Actions"
|
env:
|
||||||
|
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||||
|
- run: |
|
||||||
|
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
|
||||||
|
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
|
||||||
|
|
||||||
- name: Create PR if files found
|
- name: Create PR if files found
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||||
run: |
|
run: |
|
||||||
script_name="wf-test"
|
script_name="wf-test"
|
||||||
target_repo="community-scripts/ProxmoxVE"
|
target_repo="community-scripts/ProxmoxVE"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user