performance test: creating multiple clusters at once #1
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: Build - Uffizzi Cluster Operator | |
on: | |
pull_request: | |
branches: [ main ] | |
types: [opened,reopened,synchronize,closed] | |
permissions: | |
contents: read | |
pull-requests: write | |
id-token: write | |
jobs: | |
build-operator: | |
name: Build and Push `operator` Image | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }} | |
outputs: | |
tags: ${{ steps.meta.outputs.tags }} | |
uuid: ${{ env.UUID_OPERATOR }} | |
steps: | |
- name: Checkout git repo | |
uses: actions/checkout@v3 | |
- name: Generate UUID image name | |
id: uuid | |
run: echo "UUID_OPERATOR=$(uuidgen)" >> $GITHUB_ENV | |
- name: Docker metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
# An anonymous, emphemeral registry built on ttl.sh | |
images: registry.uffizzi.com/${{ env.UUID_OPERATOR }} | |
tags: type=raw,value=48h | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and Push Image to Uffizzi Ephemeral Registry | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
context: ./ | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Create Helm Values File | |
run: | | |
cat <<EOF > helm-values.yaml | |
image: | |
repository: registry.uffizzi.com/${{ env.UUID_OPERATOR }} | |
tag: 48h | |
EOF | |
cat helm-values.yaml # For debugging, to check the contents of the file. | |
- name: Upload Helm Values as Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: helm-values | |
path: helm-values.yaml |