Skip to content

Merge branch 'main' into ssb #37

Merge branch 'main' into ssb

Merge branch 'main' into ssb #37

Workflow file for this run

name: SSB CI
on:
push:
branches:
- "**"
tags:
- "*"
pull_request:
branches:
- main
- ssb
env:
REGISTRY: europe-north1-docker.pkg.dev/${{ secrets.GAR_PROJECT_ID }}/dapla-lab-docker/onyxia
IMAGE: onyxia-web
TAG: ${{ github.ref_name }}-${{ github.sha }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: InseeFrLab/onyxia@gh-actions
with:
action_name: checkout
sub_directory: web
- uses: actions/[email protected]
- uses: bahmutov/[email protected]
- run: yarn build
- run: npx keycloakify
env:
XDG_CACHE_HOME: "/home/runner/.cache/yarn"
test_helm-chart:
runs-on: ubuntu-latest
steps:
- uses: InseeFrLab/onyxia@gh-actions
with:
action_name: checkout
sub_directory: helm-chart
- uses: azure/[email protected]
with:
token: ${{github.token}}
- run: helm lint .
docker:
permissions:
contents: "read"
id-token: "write"
runs-on: ubuntu-latest
steps:
- uses: InseeFrLab/onyxia@gh-actions
with:
action_name: checkout
sub_directory: web
- id: "auth"
name: "Authenticate to Google Cloud"
uses: "google-github-actions/[email protected]"
with:
workload_identity_provider: "projects/${{ secrets.GAR_PROJECT_NUMBER }}/locations/global/workloadIdentityPools/gh-actions/providers/gh-actions"
service_account: "gh-actions-dapla-lab@${{ secrets.GAR_PROJECT_ID }}.iam.gserviceaccount.com"
token_format: "access_token"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: "oauth2accesstoken"
password: "${{ steps.auth.outputs.access_token }}"
- name: Computing Docker image tags
id: metadata
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE }}
# Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=sha
type=raw,value=${{ env.TAG }}, enable=true
- uses: docker/build-push-action@v5
with:
push: true
context: .
tags: |
${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}