Manual Deploy #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Manual Deploy | |
on: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
deploy-chains: | |
name: Deploy Kusama/Polkadot Relay | |
runs-on: ubuntu-latest | |
# Use an environment that is protected by required reviewers/teams (e.g. Bridges Core, DevOps, CI, Core Devs) | |
environment: | |
name: parity-chains | |
env: | |
VERSION: ${{ github.ref_name }} | |
ARGOCD_SERVER: "argocd-chains.teleport.parity.io" | |
# Use the provided tag input as the version | |
steps: | |
- name: Check if Docker image exists on Docker Hub | |
run: | | |
echo "VERSION=${{ env.VERSION }}" | |
[[ "${{ env.VERSION }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "Valid tag" || echo "Invalid tag" | |
IMAGE=paritytech/substrate-relay:${{ env.VERSION }} | |
echo "Checking existence of Docker image ${IMAGE}..." | |
# Query Docker Hub API for the tag; exit nonzero if not found | |
URL="https://hub.docker.com/v2/repositories/paritytech/substrate-relay/tags/${{ env.VERSION }}" | |
if curl --fail --silent "$URL" > /dev/null; then | |
echo "Image ${IMAGE} exists." | |
else | |
echo "Error: Image ${IMAGE} does not exist. Aborting deployment." | |
exit 1 | |
fi | |
- name: Deploy to ArgoCD | |
uses: paritytech/argocd-deployment-action@main | |
with: | |
environment: "parity-chains" | |
tag: "${{ env.VERSION }}" | |
app_name: "bridges-common-relay" | |
app_packages: "headers-a,headers-b,parachains-a,parachains-b,messages-a,messages-b" | |
argocd_server: ${{ env.ARGOCD_SERVER }} | |
teleport_token: "parity-bridges-common" | |
teleport_app_name: "argocd-chains" | |
argocd_auth_token: ${{ secrets.ARGOCD_AUTH_TOKEN }} |