Skip to content

Commit

Permalink
Merge pull request kubernetes#142 from chiukapoor/release-sync-automa…
Browse files Browse the repository at this point in the history
…tion

Checkout branch before dapper validate
  • Loading branch information
chiukapoor authored Oct 11, 2024
2 parents fdc6ba2 + a073d8d commit e3e100f
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/upstream-release-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ jobs:
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Checkout repository with branch ${{ matrix.branches }}
uses: actions/checkout@v4
with:
ref: ${{ matrix.branches }}

- name: Download git repo from artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -79,34 +74,37 @@ jobs:
tar -zxf rancher-ingress-nginx.tar.gz
rm rancher-ingress-nginx.tar.gz
- name: Validate with Dapper for ${{ matrix.branches }}
run: |
git checkout ${{ matrix.branches }}
dapper validate
- name: Build with Dapper for ${{ matrix.branches }}
run: |
git stash --all
dapper build
- name: Read App Secrets
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/github/app-credentials appId | APP_ID ;
secret/data/github/repo/${{ github.repository }}/github/app-credentials privateKey | PRIVATE_KEY
- name: Create App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ env.APP_ID }}
private-key: ${{ env.PRIVATE_KEY }}

- name: Validate with Dapper for ${{ matrix.branches }}
run: dapper validate

- name: Build with Dapper for ${{ matrix.branches }}
run: |
git stash --all
dapper build
- name: Push release tag for ${{ matrix.branches }}
run: |
# To stash any changes created by dapper CI run
git stash --all
if ! $(git push --quiet --no-progress origin $RELEASE_BRANCH > /dev/null); then
echo "[ERROR] Failed while pushing the branch $RELEASE_BRANCH to rancher repository."
echo "[ERROR] Failed while pushing the branch $RELEASE_BRANCH to rancher repository. Skipping the version $RELEASE_BRANCH."
exit 1
else
echo "[INFO] Successfully pushed branch $RELEASE_BRANCH: https://github.com/rancher/ingress-nginx/tree/$RELEASE_BRANCH"
Expand Down

0 comments on commit e3e100f

Please sign in to comment.