Use OIDC metadata discovery to find jwks_uri #1318
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: Bundler Container | |
on: | |
push: | |
pull_request: | |
jobs: | |
build_publish: | |
# Deduplicate jobs from pull requests and branch pushes within the same repo. | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
services: | |
ispyb: | |
image: ghcr.io/diamondlightsource/ispyb-database:v3.0.0 | |
env: | |
MARIADB_ROOT_PASSWORD: rootpassword | |
options: > | |
--health-cmd "/usr/local/bin/healthcheck.sh --defaults-file=/ispyb/.my.cnf --connect" | |
ports: | |
- 3306:3306 | |
steps: | |
- name: Checkout source | |
uses: actions/[email protected] | |
- name: Generate Image Name | |
run: echo IMAGE_REPOSITORY=ghcr.io/$(echo "${{ github.repository }}-bundler" | tr '[:upper:]' '[:lower:]' | tr '[_]' '[\-]') >> $GITHUB_ENV | |
- name: Log in to GitHub Docker Registry | |
if: github.event_name != 'pull_request' | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker Metadata | |
id: meta | |
uses: docker/[email protected] | |
with: | |
images: ${{ env.IMAGE_REPOSITORY }} | |
tags: | | |
type=ref,event=tag | |
type=raw,value=latest | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
with: | |
driver-opts: network=host | |
- name: Build & Publish Image | |
uses: docker/[email protected] | |
with: | |
build-args: DATABASE_URL=mysql://root:rootpassword@localhost:3306/ispyb_build | |
context: bundler/ | |
push: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }} | |
load: ${{ !(github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |