We need instance password if available to job does try to regenerate … #19
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Internal GHE Repo | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
env: | |
GITHUB_BRANCH: ${{ github.ref_name }} | |
REMOTE_REPO: automation-paas-cd-pipeline/mas-gitops | |
jobs: | |
update-repo: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout local repo | |
uses: actions/checkout@v4 | |
with: | |
path: source | |
- name: Checkout remote repo | |
uses: actions/checkout@v4 | |
with: | |
github-server-url: https://github.ibm.com | |
repository: ${{ env.REMOTE_REPO }} | |
ref: ${{ env.GITHUB_BRANCH }} | |
token: ${{ secrets.ACTIONS_GITHUB_TOKEN }} | |
path: target | |
- name: Copy over files | |
run: $GITHUB_WORKSPACE/build/bin/copy-gitops.sh -s $GITHUB_WORKSPACE/source -t $GITHUB_WORKSPACE/target | |
- name: Setup git config | |
run: | | |
cd $GITHUB_WORKSPACE/target | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
- name: Commit changes to remote repo | |
run: | | |
echo "Push changes to ${{ env.GITHUB_BRANCH }} branch of https://github.ibm.com/${{ env.REMOTE_REPO }}" | |
git push origin ${{ env.GITHUB_BRANCH }} |