-
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.
Merge branch 'devel' into restrict-projects-persistance-rwx
- Loading branch information
Showing
25 changed files
with
488 additions
and
111 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
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
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 |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Publish AWX Operator on operator-hub | ||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
inputs: | ||
tag_name: | ||
description: 'Name for the tag of the release.' | ||
required: true | ||
operator_hub_fork: | ||
description: 'Fork of operator-hub where the PR will be created from. default: awx-auto' | ||
required: true | ||
default: 'awx-auto' | ||
image_registry: | ||
description: 'Image registry where the image is published to. default: quay.io' | ||
required: true | ||
default: 'quay.io' | ||
image_registry_organization: | ||
description: 'Image registry organization where the image is published to. default: ansible' | ||
required: true | ||
default: 'ansible' | ||
community_operator_github_org: | ||
description: 'Github organization for community-opeartor project. default: k8s-operatorhub' | ||
required: true | ||
default: 'k8s-operatorhub' | ||
community_operator_prod_github_org: | ||
description: 'GitHub organization for community-operator-prod project. default: redhat-openshift-ecosystem' | ||
required: true | ||
default: 'redhat-openshift-ecosystem' | ||
jobs: | ||
promote: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set GITHUB_ENV from workflow_dispatch event | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
run: | | ||
echo "VERSION=${{ 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 GITHUB_ENV for release event | ||
if: ${{ github.event_name == 'release' }} | ||
run: | | ||
echo "VERSION=${{ 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 ${{ env.IMAGE_REGISTRY }} -u ${{ secrets.QUAY_USER }} --password-stdin | ||
- name: Checkout awx-operator at workflow branch | ||
uses: actions/checkout@v4 | ||
with: | ||
path: awx-operator | ||
|
||
- name: Checkout awx-opearator at ${{ env.VERSION }} | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-tags: true | ||
ref: ${{ env.VERSION }} | ||
path: awx-operator-${{ env.VERSION }} | ||
fetch-depth: 0 # fetch all history so that git describe works | ||
Check warning on line 67 in .github/workflows/publish-operator-hub.yaml GitHub Actions / molecule (--skip-tags=replicas)
|
||
|
||
- name: Copy scripts to awx-operator-${{ env.VERSION }} | ||
run: | | ||
cp -f \ | ||
awx-operator/hack/publish-to-operator-hub.sh \ | ||
awx-operator-${{ env.VERSION }}/hack/publish-to-operator-hub.sh | ||
cp -f \ | ||
awx-operator/Makefile \ | ||
awx-operator-${{ env.VERSION }}/Makefile | ||
- name: Build and publish bundle to operator-hub | ||
working-directory: awx-operator-${{ env.VERSION }} | ||
env: | ||
IMG_REPOSITORY: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REGISTRY_ORGANIZATION }} | ||
GITHUB_TOKEN: ${{ secrets.AWX_AUTO_GITHUB_TOKEN }} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "AWX Automation" | ||
./hack/publish-to-operator-hub.sh |
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
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
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
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
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
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
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
Oops, something went wrong.