Skip to content

Commit

Permalink
Merge pull request #104 from stakater/publish-operator-fix
Browse files Browse the repository at this point in the history
Remove git clone action
  • Loading branch information
tanalam2411 authored May 9, 2024
2 parents 0c53770 + a2693af commit 2e077db
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/publish_operator_image_and_bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ jobs:
- name: Generate image repository path
run: |
echo IMAGE_REPOSITORY=$(echo quay.io/${{ secrets.OPERATORHUB_REPOSITORY }}) >> $GITHUB_ENV
# Build and push tag
- name: Build and push
id: build_and_push
Expand Down Expand Up @@ -273,19 +273,22 @@ jobs:
git status
git add .
git commit -m "[skip-ci] Update artifacts" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.ADMIN_TOKEN }}
branch: main
- name: Clone stakater/certified-operators repository
uses: GuillaumeFalourd/clone-github-repo-action@v3
with:
owner: 'stakater'
repository: 'certified-operators'
access-token: ${{ secrets.STAKATER_GITHUB_TOKEN }}
run: |
if [ -z "${{ secrets.STAKATER_GITHUB_TOKEN }}" ]; then
git clone https://github.com/stakater/certified-operators.git
else
git clone https://${{ secrets.STAKATER_GITHUB_TOKEN }}@github.com/stakater/certified-operators.git
fi
if [ -d "certified-operators" ]; then
echo "Cloned certified-operators repository successfully."
echo "Access the repository content using \"cd certified-operators\"."
else
echo "Error: Couldn't clone certified-operators repository. Check the inputs or the PAT scope."
exit 1
fi
- name: Push branch
run: |
Expand All @@ -303,7 +306,13 @@ jobs:
git add .
git commit -am "Updated multi-tenant-operator to ${{ needs.publish-image.outputs.latest_tag}}"
git push --set-upstream origin mto-${{ needs.publish-image.outputs.latest_tag}}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.ADMIN_TOKEN }}
branch: main

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Expand Down

0 comments on commit 2e077db

Please sign in to comment.