mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-08 22:33:35 +00:00
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
This commit is contained in:
18
.github/workflows/publish-operator-hub.yaml
vendored
18
.github/workflows/publish-operator-hub.yaml
vendored
@@ -31,19 +31,27 @@ jobs:
|
|||||||
promote:
|
promote:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set TAG_NAME from workflow_dispatch event
|
- name: Set GITHUB_ENV from workflow_dispatch event
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
run: |
|
run: |
|
||||||
echo "TAG_NAME=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
|
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' }}
|
if: ${{ github.event_name == 'release' }}
|
||||||
run: |
|
run: |
|
||||||
echo "TAG_NAME=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
|
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
|
- name: Log in to image registry
|
||||||
run: |
|
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
|
- name: Checkout awx-operator at workflow branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -66,10 +74,8 @@ jobs:
|
|||||||
- name: Build and publish bundle to operator-hub
|
- name: Build and publish bundle to operator-hub
|
||||||
working-directory: awx-operator-${{ env.TAG_NAME }}
|
working-directory: awx-operator-${{ env.TAG_NAME }}
|
||||||
env:
|
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 }}
|
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: |
|
run: |
|
||||||
git config --global user.email "awx-automation@redhat.com"
|
git config --global user.email "awx-automation@redhat.com"
|
||||||
git config --global user.name "AWX Automation"
|
git config --global user.name "AWX Automation"
|
||||||
|
|||||||
Reference in New Issue
Block a user