Break-out early if the image already exists (#23)
diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml
new file mode 100644
index 0000000..36752c0
--- /dev/null
+++ b/.github/workflows/promote.yml
@@ -0,0 +1,32 @@
+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 all)"
+ outputs:
+ strategy: ${{ steps.set-strategy.outputs.strategy }}
+
+ promote-openstack-images:
+ runs-on: ubuntu-latest
+ needs:
+ - build-image-strategy
+ strategy: ${{ fromJSON(needs.build-image-strategy.outputs.strategy) }}
+ steps:
+ - 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 }}