From 952100e886c0646d23b7be90608fb818b69a29e7 Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Thu, 16 Nov 2023 19:24:06 -0500 Subject: [PATCH] use cd to deploy new proxy versions --- .github/workflows/docker-build.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index fba05dd2..5982d400 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -2,7 +2,7 @@ name: docker-build on: push: - branches: [ main ] + branches: [ main, cd-setup ] jobs: docker-build: @@ -38,6 +38,7 @@ jobs: ghcr.io/pluralsh/marketing-proxy # generate Docker tags based on the following events/attributes tags: | + type=sha type=ref,event=branch type=ref,event=pr type=semver,pattern={{raw}},value=${{ steps.latest_tag.outputs.new_patch }} @@ -55,4 +56,17 @@ jobs: platforms: linux/amd64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} + update-service: + needs: [docker-build] + runs-on: plrl-github-actions-runner + env: + PLURAL_CONSOLE_TOKEN: ${{ secrets.PLURAL_CONSOLE_TOKEN }} + PLURAL_CONSOLE_URL: ${{ secrets.PLURAL_CONSOLE_URL }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: installing plural + uses: pluralsh/setup-plural@v0.2.0 + - name: Update service + run: plural cd services update @mgmt/marketing --conf tag=sha-$(git rev-parse --short HEAD) \ No newline at end of file