Removed antiaffinity from jobs, reduced builder resources (#926) #515
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: radix-operator-build | |
on: | |
push: | |
branches: | |
- master | |
- release | |
permissions: | |
id-token: write | |
jobs: | |
get-target-configs: | |
name: Get target configs for branch | |
outputs: | |
target_configs: ${{ steps.get-target-configs.outputs.target_configs }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get target configs | |
id: get-target-configs | |
run: | | |
configs=$(ls $GITHUB_WORKSPACE/.github/workflows/config/${GITHUB_REF_NAME} | jq -Rsc '. / "\n" - [""]') | |
echo "target_configs=${configs}" >> $GITHUB_OUTPUT | |
build-deploy-pipeline-and-operator: | |
name: " " | |
runs-on: ubuntu-20.04 | |
needs: | |
- get-target-configs | |
strategy: | |
fail-fast: false | |
matrix: | |
config: ${{ fromJson(needs.get-target-configs.outputs.target_configs) }} | |
script: [build-push-operator.sh, build-push-pipeline.sh] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Persist environment from ${{ matrix.config }} across steps | |
run: | | |
$GITHUB_WORKSPACE/.github/workflows/scripts/persist-env.sh ${{ matrix.config }} | |
- uses: azure/login@v1 | |
with: | |
client-id: ${{ env.AZURE_CLIENT_ID }} | |
tenant-id: ${{ env.AZURE_TENANT_ID }} | |
subscription-id: ${{ env.AZURE_SUBSCRIPTION_ID }} | |
- name: Build and push image | |
run: | | |
$GITHUB_WORKSPACE/.github/workflows/scripts/${{ matrix.script }} |