| name: promote |
| on: |
| push: |
| branches: |
| - main |
| |
| jobs: |
| build-image-strategy: |
| runs-on: ubuntu-latest |
| steps: |
| - uses: actions/checkout@v3.0.2 |
| - id: set-strategy |
| run: echo "::set-output name=strategy::$(./ci/build-image-strategy promote)" |
| outputs: |
| strategy: ${{ steps.set-strategy.outputs.strategy }} |
| |
| promote-openstack-images: |
| if: needs.build-image-strategy.outputs.strategy != '{}' |
| runs-on: ubuntu-latest |
| needs: |
| - build-image-strategy |
| strategy: ${{ fromJSON(needs.build-image-strategy.outputs.strategy) }} |
| steps: |
| - uses: actions/checkout@v3.0.2 |
| - run: ./ci/openstack-image-build-env ${{ matrix.project }} ${{ matrix.release }} >> $GITHUB_ENV |
| - uses: docker/login-action@v2.0.0 |
| with: |
| registry: quay.io |
| username: ${{ secrets.QUAY_USERNAME }} |
| password: ${{ secrets.QUAY_ROBOT_TOKEN }} |
| - uses: akhilerm/tag-push-action@v2.0.0 |
| with: |
| src: quay.io/vexxhost/${{ matrix.project }}:${{ env.PROJECT_REF }} |
| dst: quay.io/vexxhost/${{ matrix.project }}:${{ matrix.release }} |