Skip to content

ci: workflow indentation fix (#654) #1000

ci: workflow indentation fix (#654)

ci: workflow indentation fix (#654) #1000

name: aks-addon-e2e-tests
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
pull_request:
branches: [master]
paths-ignore: ['docs/**', '**.md', '**.mdx', '**.png', '**.jpg']
push:
branches: [master]
paths-ignore: ['docs/**', '**.md', '**.mdx', '**.png', '**.jpg']
env:
REGISTRY: ghcr.io
GO_VERSION: '1.22' # Common versions
E2E_IMG_TAG: 'e2e-ci'
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
actions: read #This is required for reading environment variables
deployments: read #This is required for reading deployment status
jobs:
aks-addon-e2e-tests:
environment: test
runs-on: ubuntu-latest
steps:
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Get Repo
run: |
echo "REGISTRY=$(echo "${{ env.REGISTRY }}/${{ github.repository }}" | tr [:upper:] [:lower:])" >> $GITHUB_ENV
- name: Set e2e Cluster Name
run: |
echo "pr_sha_short=$(git rev-parse --short ${{ github.event.pull_request.head.sha }} )" >> $GITHUB_ENV
rand=${{ env.pr_sha_short }}
if [ "$rand" = "" ]; then
rand=$RANDOM
fi
echo "CLUSTER_NAME=aks-addon-vk-test${rand}" >> $GITHUB_ENV
- uses: azure/[email protected]
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Run e2e test
run: |
OUTPUT_TYPE=type=registry make aks-addon-e2e-test
env:
REGISTRY: ${{ env.REGISTRY}}
E2E_REGION: ${{ secrets.E2E_REGION}}
CLUSTER_NAME: ${{ env.CLUSTER_NAME }}
VERSION: ${{ env.E2E_IMG_TAG}}
E2E_TARGET: "pr"
PR_COMMIT_SHA: ${{ env.pr_sha_short }}
- name: Cleanup e2e resources
if: ${{ always() }}
run: |
set +e
az group delete --name "${{ env.CLUSTER_NAME }}" --yes --no-wait || true