Mohammed Naser | bd5eaa1 | 2022-08-30 03:03:49 -0400 | [diff] [blame] | 1 | name: promote |
| 2 | on: |
| 3 | push: |
| 4 | branches: |
| 5 | - main |
| 6 | |
| 7 | jobs: |
| 8 | build-image-strategy: |
| 9 | runs-on: ubuntu-latest |
| 10 | steps: |
| 11 | - uses: actions/checkout@v3.0.2 |
| 12 | - id: set-strategy |
Mohammed Naser | 81d183d | 2022-08-30 03:14:11 -0400 | [diff] [blame] | 13 | run: echo "::set-output name=strategy::$(./ci/build-image-strategy promote)" |
Mohammed Naser | bd5eaa1 | 2022-08-30 03:03:49 -0400 | [diff] [blame] | 14 | outputs: |
| 15 | strategy: ${{ steps.set-strategy.outputs.strategy }} |
| 16 | |
| 17 | promote-openstack-images: |
Mohammed Naser | 5ebef6a | 2022-08-30 03:15:17 -0400 | [diff] [blame] | 18 | if: needs.build-image-strategy.outputs.strategy != '{}' |
Mohammed Naser | bd5eaa1 | 2022-08-30 03:03:49 -0400 | [diff] [blame] | 19 | runs-on: ubuntu-latest |
| 20 | needs: |
| 21 | - build-image-strategy |
| 22 | strategy: ${{ fromJSON(needs.build-image-strategy.outputs.strategy) }} |
| 23 | steps: |
Mohammed Naser | 870332b | 2022-08-30 03:06:07 -0400 | [diff] [blame] | 24 | - uses: actions/checkout@v3.0.2 |
Mohammed Naser | bd5eaa1 | 2022-08-30 03:03:49 -0400 | [diff] [blame] | 25 | - 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 }} |