-
Notifications
You must be signed in to change notification settings - Fork 639
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix operator-hub release CI when triggering from release (#1623)
Fix operator-hub release CI When triggering from release default values for input is not accessible
- Loading branch information
1 parent
718e5cf
commit 0fb252b
Showing
1 changed file
with
12 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,19 +31,27 @@ jobs: | |
promote: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set TAG_NAME from workflow_dispatch event | ||
- name: Set GITHUB_ENV from workflow_dispatch event | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
run: | | ||
echo "TAG_NAME=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV | ||
echo "IMAGE_REGISTRY=${{ github.event.inputs.image_registry }}" >> $GITHUB_ENV | ||
echo "IMAGE_REGISTRY_ORGANIZATION=${{ github.event.inputs.image_registry_organization }}" >> $GITHUB_ENV | ||
echo "COMMUNITY_OPERATOR_GITHUB_ORG=${{ github.event.inputs.community_operator_github_org }}" >> $GITHUB_ENV | ||
echo "COMMUNITY_OPERATOR_PROD_GITHUB_ORG=${{ github.event.inputs.community_operator_prod_github_org }}" >> $GITHUB_ENV | ||
- name: Set TAG_NAME for release event | ||
- name: Set GITHUB_ENV for release event | ||
if: ${{ github.event_name == 'release' }} | ||
run: | | ||
echo "TAG_NAME=${{ github.event.release.tag_name }}" >> $GITHUB_ENV | ||
echo "IMAGE_REGISTRY=quay.io" >> $GITHUB_ENV | ||
echo "IMAGE_REGISTRY_ORGANIZATION=ansible" >> $GITHUB_ENV | ||
echo "COMMUNITY_OPERATOR_GITHUB_ORG=k8s-operatorhub" >> $GITHUB_ENV | ||
echo "COMMUNITY_OPERATOR_PROD_GITHUB_ORG=redhat-openshift-ecosystem" >> $GITHUB_ENV | ||
- name: Log in to image registry | ||
run: | | ||
echo ${{ secrets.QUAY_TOKEN }} | docker login ${{github.event.inputs.image_registry}} -u ${{ secrets.QUAY_USER }} --password-stdin | ||
echo ${{ secrets.QUAY_TOKEN }} | docker login ${{ env.IMAGE_REGISTRY }} -u ${{ secrets.QUAY_USER }} --password-stdin | ||
- name: Checkout awx-operator at workflow branch | ||
uses: actions/checkout@v4 | ||
|
@@ -66,10 +74,8 @@ jobs: | |
- name: Build and publish bundle to operator-hub | ||
working-directory: awx-operator-${{ env.TAG_NAME }} | ||
env: | ||
IMG_REPOSITORY: ${{ github.event.inputs.image_registry }}/${{ github.event.inputs.image_registry_organization }} | ||
IMG_REPOSITORY: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REGISTRY_ORGANIZATION }} | ||
GITHUB_TOKEN: ${{ secrets.AWX_AUTO_GITHUB_TOKEN }} | ||
COMMUNITY_OPERATOR_GITHUB_ORG: ${{ github.event.inputs.community_operator_github_org }} | ||
COMMUNITY_OPERATOR_PROD_GITHUB_ORG: ${{ github.event.inputs.community_operator_prod_github_org }} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "AWX Automation" | ||
|