promote-tag #8
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
--- | |
name: promote-tag | |
on: | |
workflow_dispatch: | |
inputs: | |
os: | |
description: 'Openstack release' | |
required: true | |
default: '2023.01' | |
type: choice | |
options: | |
- yoga | |
- zed | |
- '2023.01' | |
profile: | |
description: 'Kolla profile' | |
required: true | |
default: 'main' | |
type: choice | |
options: | |
- heat | |
- horizon | |
- main | |
- mariadb | |
- neutron | |
- nova | |
- toolbox | |
confirm: | |
description: 'Are you sure? Set this to yes.' | |
required: true | |
default: 'no' | |
env: | |
yoga: "quay.io/fitbeard/kolla/rocky-source-" | |
zed: "quay.io/fitbeard/kolla/" | |
'2023.01': "quay.io/fitbeard/kolla/" | |
jobs: | |
promote-tag: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: Verify inputs | |
id: verify | |
run: | | |
set -e | |
if [[ ${{ github.event.inputs.confirm }} != "yes" ]]; then | |
>&2 echo "Confirm must be 'yes'" | |
exit 1 | |
fi | |
exit 0 | |
- name: Authenticate with Quay.io | |
uses: docker/[email protected] | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_ROBOT_TOKEN }} | |
- name: Setup Crane | |
uses: imjasonh/[email protected] | |
with: | |
version: v0.15.1 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install -r releases/${{ github.event.inputs.os }}/requirements.txt | |
- name: Generate kolla config | |
run: | | |
python kolla-builder.py generate-config -i releases/${{ github.event.inputs.os }}/config.yml -o releases/${{ github.event.inputs.os }}/kolla-build.conf | |
- name: Promote new tag | |
run: | | |
kolla-build --version | |
PROFILE=${{ github.event.inputs.profile }} bash promote-tag.sh -c releases/${{ github.event.inputs.os }}/kolla-build.conf -r ${{ env[github.event.inputs.os] }} -ti ${{ github.event.inputs.os }}-dev -to ${{ github.event.inputs.os }}-$(date -u +"%Y.%m%d.%H%M%S") |