blob: 28db1a09aee277b0157ee056d0bb5c1a87f0b41b [file] [log] [blame]
Mohammed Naserbd5eaa12022-08-30 03:03:49 -04001name: promote
2on:
3 push:
4 branches:
5 - main
6
7jobs:
8 build-image-strategy:
9 runs-on: ubuntu-latest
10 steps:
11 - uses: actions/checkout@v3.0.2
12 - id: set-strategy
Mohammed Naser81d183d2022-08-30 03:14:11 -040013 run: echo "::set-output name=strategy::$(./ci/build-image-strategy promote)"
Mohammed Naserbd5eaa12022-08-30 03:03:49 -040014 outputs:
15 strategy: ${{ steps.set-strategy.outputs.strategy }}
16
17 promote-openstack-images:
Mohammed Naser5ebef6a2022-08-30 03:15:17 -040018 if: needs.build-image-strategy.outputs.strategy != '{}'
Mohammed Naserbd5eaa12022-08-30 03:03:49 -040019 runs-on: ubuntu-latest
20 needs:
21 - build-image-strategy
22 strategy: ${{ fromJSON(needs.build-image-strategy.outputs.strategy) }}
23 steps:
Mohammed Naser870332b2022-08-30 03:06:07 -040024 - uses: actions/checkout@v3.0.2
Mohammed Naserbd5eaa12022-08-30 03:03:49 -040025 - run: ./ci/openstack-image-build-env ${{ matrix.project }} ${{ matrix.release }} >> $GITHUB_ENV
26 - uses: docker/login-action@v2.0.0
27 with:
28 registry: quay.io
29 username: ${{ secrets.QUAY_USERNAME }}
30 password: ${{ secrets.QUAY_ROBOT_TOKEN }}
31 - uses: akhilerm/tag-push-action@v2.0.0
32 with:
33 src: quay.io/vexxhost/${{ matrix.project }}:${{ env.PROJECT_REF }}
34 dst: quay.io/vexxhost/${{ matrix.project }}:${{ matrix.release }}