setting docs production to chart version 0.80.0 #67
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: Publish docs on prod | |
env: | |
ARGO_NAMESPACE: argo | |
ARGO_VERSION: v3.4.1 | |
CONTAINER_REGISTRY_URL: 'public.ecr.aws/kubefirst' | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '.github/**' | |
- '.tools/**' | |
workflow_dispatch: | |
jobs: | |
publish: | |
if: ${{ github.actor != 'kube1st' }} | |
runs-on: self-hosted | |
steps: | |
- name: Wait for other releases processes to finish | |
uses: ahmadnassri/[email protected] | |
- name: Setup Runner for Argo | |
run: | | |
cd "$HOME" | |
echo "Install argo" | |
# Download the binary | |
curl -sLO "https://github.com/argoproj/argo-workflows/releases/download/${ARGO_VERSION}/argo-linux-amd64.gz" | |
# Unzip | |
gunzip argo-linux-amd64.gz | |
# Make binary executable | |
chmod +x argo-linux-amd64 | |
# Move binary to path | |
sudo mv ./argo-linux-amd64 /usr/local/bin/argo | |
# Test installation | |
argo version --short | |
- name: Check out repository code | |
uses: actions/[email protected] | |
- name: Inject slug/short variables | |
uses: rlespinasse/[email protected] | |
# No matter how we try ski ci options from GitHub it doesn't work | |
- name: Temporarily disable docs branch protections | |
uses: benjefferies/[email protected] | |
with: | |
access_token: ${{ secrets.DOCS_PERMISSIONS_TOKEN }} | |
branch: ${{ github.event.repository.default_branch }} | |
# todo need to look repositoryGitURL, this needs to be overrideable from here and respected on the template side for both repositories | |
- name: Deploy docs on production | |
run: | | |
echo "commit sha $GITHUB_SHA" | |
argo version --short | |
argo submit .argo/release.yaml \ | |
--generate-name="${GITHUB_REPOSITORY_NAME_PART}-release-${GITHUB_SHA_SHORT}-${GITHUB_RUN_ATTEMPT}-" \ | |
-p appName="${GITHUB_REPOSITORY_NAME_PART}" \ | |
-p branch="${GITHUB_REF_NAME}" \ | |
-p clusterName="mgmt-20-kubefirst-com" \ | |
-p environment="production" \ | |
-p gitUrlNoProtocol="[email protected]:${GITHUB_REPOSITORY_OWNER_PART_SLUG}" \ | |
-p containerRegistryURL="${CONTAINER_REGISTRY_URL}/${GITHUB_REPOSITORY_NAME_PART}:${GITHUB_SHA_SHORT}" \ | |
-p shortSha="${GITHUB_SHA_SHORT}" \ | |
--wait --log | |
- name: Enable back docs branch protection | |
uses: benjefferies/[email protected] | |
if: always() # Force to always run this step to ensure the protection is always turned back on no matetr if previous step fail | |
with: | |
access_token: ${{ secrets.DOCS_PERMISSIONS_TOKEN }} | |
branch: ${{ github.event.repository.default_branch }} |