V1.3.4 patch #301
Workflow file for this run
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: Container release | |
on: | |
push: | |
branches: | |
- 'main' | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- '*-release' | |
workflow_dispatch: | |
permissions: {} | |
jobs: | |
frontend: | |
name: Build/release frontend container | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/metadata-action@v5 | |
id: metadata | |
with: | |
images: ghcr.io/esgf2-us/metagrid-frontend | |
tags: | | |
type=ref,event=pr | |
type=ref,event=tag | |
- uses: docker/build-push-action@v4 | |
with: | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
context: frontend/ | |
file: frontend/Dockerfile | |
push: true | |
tags: ${{ steps.metadata.outputs.tags }} | |
labels: ${{ steps.metadata.outputs.labels }} | |
backend: | |
name: Build/release backend container | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/metadata-action@v5 | |
id: metadata | |
with: | |
images: ghcr.io/esgf2-us/metagrid-backend | |
tags: | | |
type=ref,event=pr | |
type=ref,event=tag | |
- uses: docker/build-push-action@v4 | |
with: | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
context: backend/ | |
file: backend/Dockerfile | |
push: true | |
tags: ${{ steps.metadata.outputs.tags }} | |
labels: ${{ steps.metadata.outputs.labels }} | |
test: | |
name: Test Helm Chart | |
runs-on: ubuntu-latest | |
needs: [frontend, backend] | |
if: github.event_name == 'pull_request' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Start minikube | |
uses: medyagh/setup-minikube@latest | |
- name: Set up Helm | |
uses: azure/[email protected] | |
- name: Install Helm Chart | |
working-directory: helm/ | |
run: | | |
PR_NUMBER=$(echo ${GITHUB_REF} | awk -F'/' '{print $3}') | |
helm repo add bitnami https://charts.bitnami.com/bitnami | |
helm dependency build | |
helm install test . \ | |
--set frontend.image.tag=pr-${PR_NUMBER} \ | |
--set backend.image.tag=pr-${PR_NUMBER} \ | |
--wait | |
kubectl get pods |