Skip to content

primazactl-test

primazactl-test #123

Workflow file for this run

name: Primazactl pr checks
on:
pull_request:
types: [opened, synchronize, reopened]
branches: [ main ]
repository_dispatch:
types: [primazactl-test]
env:
GITHUB_TOKEN: ${{ secrets.MM_TOKEN }}
jobs:
build:
name: Build artifacts
runs-on: ubuntu-20.04
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "^1.20"
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
architecture: "x64"
- name: Checkout repo
uses: actions/checkout@v3
- name: Lint python
run: make lint
- name: Set Version and Images
id: sets-version
run: |
# set version based on job type
if [[ "${{github.event_name}}" == "repository_dispatch" ]]; then
primaza_version=${{ github.event.client_payload.version }}
echo "primaza_version=$primaza_version" >> $GITHUB_OUTPUT
echo "ORG=${{ github.event.client_payload.organization }}" >> $GITHUB_ENV
echo "RUN_FROM=release" >> $GITHUB_ENV
echo "VERSION=$primaza_version" >> >> $GITHUB_ENV
else
echo "primaza_version=latest" >> $GITHUB_OUTPUT
echo "RUN_FROM=config" >> $GITHUB_ENV
echo "VERSION=latest" >> >> $GITHUB_ENV
fi
- name: run dry-run
env:
VERSION: ${{ steps.sets-version.outputs.primaza_version }}
run: make test-dry-run
- name: run test
env:
VERSION: ${{ steps.sets-version.outputs.primaza_version }}
run: make test-local-no-setup
- name: run test with users
env:
VERSION: ${{ steps.sets-version.outputs.primaza_version }}
CLEAN: clusters
run: make test-users
- name: run test with output
env:
VERSION: ${{ steps.sets-version.outputs.primaza_version }}
CLEAN: clusters
run: make test-output
- name: run apply command
env:
VERSION: ${{ steps.sets-version.outputs.primaza_version }}
CLEAN: clusters
run: make test-apply
- name: run test version
if: ${{ env.RUN_FROM == 'config' }}
env:
VERSION: ${{ steps.sets-version.outputs.primaza_version }}
run: make test-version
- name: trigger release
if: ${{ github.event_name == 'repository_dispatch' }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.MM_TOKEN }}
repository: mmulholla/primazactl
event-type: primazactl-release
client-payload: '{"version": "${{ env.VERSION }}"}'