Skip to content

Merge pull request #1632 from equinor/flux-image-updates #171

Merge pull request #1632 from equinor/flux-image-updates

Merge pull request #1632 from equinor/flux-image-updates #171

name: Move Custom ingresses
on:
push:
branches:
- 'master'
paths:
- 'clusters/development/postBuild.yaml'
workflow_dispatch:
inputs:
radixZone:
description: 'Radix Zone'
required: true
type: choice
default: 'development'
options:
- 'development'
- 'monitoring'
- 'playground'
- 'production'
- 'c2-production'
permissions:
id-token: write
contents: read
jobs:
getActiveCluster:
name: Get active cluster
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
env:
radixZone: ${{ inputs.radixZone || 'development' }}
outputs:
DEST_CLUSTER: ${{ steps.getActiveCluster.outputs.DEST_CLUSTER }}
RADIX_ENVIRONMENT: ${{ steps.getActiveCluster.outputs.RADIX_ENVIRONMENT }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: getActiveCluster
id: getActiveCluster
run: |
### Download yq
BINARY="yq_linux_amd64"
VERSION="v4.32.2"
postBuild="clusters/${{ env.radixZone }}/postBuild.yaml"
wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY}.tar.gz -O - |\
tar xz && sudo mv ${BINARY} /usr/bin/yq
### Start
echo "DEST_CLUSTER=$(yq '.spec.postBuild.substitute.ACTIVE_CLUSTER' < ${postBuild})" >> $GITHUB_OUTPUT
echo "RADIX_ENVIRONMENT=$(yq '.spec.postBuild.substitute.RADIX_ENVIRONMENT' < ${postBuild})" >> $GITHUB_OUTPUT
moveCustomIngress:
name: Move Custom Ingress
needs: getActiveCluster
uses: equinor/radix-platform/.github/workflows/move_custom_ingresses.yml@master
with:
DEST_CLUSTER: ${{ needs.getActiveCluster.outputs.DEST_CLUSTER }}
GH_ENVIRONMENT: maintenance-${{ needs.getActiveCluster.outputs.RADIX_ENVIRONMENT }}
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}