Skip to content

CD

CD #56

Workflow file for this run

name: CD
on:
workflow_run:
workflows: [CI]
branches: [staging, production]
types:
- completed
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: '${{ github.event.workflow_run.head_branch }}'
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=raw,value=${{ github.event.workflow_run.head_branch }}
type=sha
- id: build
uses: docker/build-push-action@v5
with:
push: true
load: true
cache-from: type=gha,scope=discordbot
cache-to: type=gha,mode=max,scope=discordbot
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
xtp:
runs-on: ubuntu-latest
env:
XTP_TOKEN: ${{ secrets.XTP_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
ref: '${{ github.event.workflow_run.head_branch }}'
- name: update the schema
run: |
body="$(jq -rcM -n --arg content "$(cat plugin.yaml)" '{"name":"events", "schema": $content}')"
EXTENSION_ID=ext_01j8r4jqawfd6tjxh85t3988kc
curl -sLfi \
-H "Authorization: Bearer $XTP_TOKEN" \
-H "content-type: application/json" \
-X PUT -d "$body" \
'https://xtp.dylibso.com/api/v1/extension-points/'$EXTENSION_ID
northflank:
runs-on: ubuntu-latest
needs: [build, xtp]
steps:
- name: Trigger release flow
run: curl -X GET ${{ secrets.NF_WEBHOOK }}?image_tag=${{ github.event.workflow_run.head_branch }}