From ffaaf03f974be3e72ba35cdca2ec36ab1429f591 Mon Sep 17 00:00:00 2001 From: jasquat Date: Tue, 24 Oct 2023 17:14:28 -0400 Subject: [PATCH] create connectory-proxy-demo docker images w/ burnettk --- .../docker_image_for_main_builds.yml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/.github/workflows/docker_image_for_main_builds.yml b/.github/workflows/docker_image_for_main_builds.yml index 5054a0034..a166b12e9 100644 --- a/.github/workflows/docker_image_for_main_builds.yml +++ b/.github/workflows/docker_image_for_main_builds.yml @@ -129,3 +129,49 @@ jobs: labels: ${{ steps.meta.outputs.labels }} - name: Adding markdown run: echo 'TAGS ${{ steps.meta.outputs.tags }}' >> "$GITHUB_STEP_SUMMARY" + + create_demo_proxy_docker_image: + runs-on: ubuntu-latest + env: + REGISTRY: ghcr.io + IMAGE_NAME: sartography/connector-proxy-demo + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + + permissions: + contents: read + packages: write + steps: + - name: Check out the repository + uses: actions/checkout@v3.3.0 + - name: Log in to the Container registry + uses: docker/login-action@v2.1.0 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Get current date + id: date + run: echo "date=$(date -u +'%Y-%m-%d_%H-%M-%S')" >> "$GITHUB_OUTPUT" + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4.4.0 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + labels: | + org.opencontainers.image.description=spiffworkflow-connector-proxy-demo + org.opencontainers.image.version=${{ env.BRANCH_NAME }}-${{ steps.date.outputs.date }} + tags: | + type=ref,event=branch,suffix=-latest + type=ref,event=branch,suffix=-${{ steps.date.outputs.date }} + + - name: Build and push the connector proxy + uses: docker/build-push-action@v4.0.0 + with: + # this action doesn't seem to respect working-directory so set context + context: connector-proxy-demo + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + - name: Adding markdown + run: echo 'TAGS ${{ steps.meta.outputs.tags }}' >> "$GITHUB_STEP_SUMMARY"