Stage Release #5
This file contains hidden or 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
| --- | |
| name: Stage Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version to stage' | |
| required: true | |
| default_awx_version: | |
| description: 'Will be injected as the DEFAULT_AWX_VERSION build arg.' | |
| required: true | |
| confirm: | |
| description: 'Are you sure? Set this to yes.' | |
| required: true | |
| default: 'no' | |
| jobs: | |
| stage: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| contents: write | |
| steps: | |
| - name: Verify inputs | |
| run: | | |
| set -e | |
| if [[ ${{ github.event.inputs.confirm }} != "yes" ]]; then | |
| >&2 echo "Confirm must be 'yes'" | |
| exit 1 | |
| fi | |
| if [[ ${{ github.event.inputs.version }} == "" ]]; then | |
| >&2 echo "Set version to continue." | |
| exit 1 | |
| fi | |
| exit 0 | |
| - name: Checkout ascender-operator | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.repository_owner }}/ascender-operator | |
| path: ascender-operator | |
| - name: Install playbook dependencies | |
| run: | | |
| python3 -m pip install docker | |
| - name: Log into registry ghcr.io | |
| uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Stage ascender-operator | |
| working-directory: ascender-operator | |
| run: | | |
| BUILD_ARGS="--build-arg DEFAULT_AWX_VERSION=${{ github.event.inputs.default_awx_version }} \ | |
| --build-arg OPERATOR_VERSION=${{ github.event.inputs.version }}" \ | |
| IMG=ghcr.io/${{ github.repository }}:${{ github.event.inputs.version }} \ | |
| make docker-buildx | |
| # - name: Run test deployment | |
| # working-directory: ascender-operator | |
| # run: | | |
| # python3 -m pip install -r molecule/requirements.txt | |
| # ansible-galaxy collection install -r molecule/requirements.yml | |
| # sudo rm -f $(which kustomize) | |
| # make kustomize | |
| # KUSTOMIZE_PATH=$(readlink -f bin/kustomize) molecule test -s kind | |
| # env: | |
| # AWX_TEST_VERSION: ${{ github.event.inputs.default_awx_version }} | |
| - name: Create Draft Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.event.inputs.version }} | |
| release_name: Release ${{ github.event.inputs.version }} | |
| draft: true |