Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ updates:
directories:
- '/cfssl'
- '/chromium'
- '/dex'
- '/elasticsearch'
- '/httpd'
- '/imgproxy'
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/dex.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: 'Build dex docker image'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
schedule:
- cron: 0 7 * * THU
push:
branches:
- main
paths:
- dex/**
pull_request:
branches:
- main
paths:
- dex/**
workflow_dispatch:
inputs: { }

permissions:
contents: read
packages: write

jobs:
build-docker-image:
name: 'Build dex-${{ matrix.image.version }} docker image'
runs-on: ubuntu-latest

strategy:
fail-fast: false
max-parallel: 10
matrix:
image:
- version: 2
latest: true
dockerfile: Dockerfile

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Build dex docker image' step
Uses Step
uses 'docker/setup-qemu-action' with ref 'v3', not a pinned commit hash

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Build dex docker image' step
Uses Step
uses 'docker/setup-buildx-action' with ref 'v3', not a pinned commit hash

- name: Read version from Dockerfile
id: docker
run: echo "version=$(./extract-version.sh ./dex/Dockerfile)" >> $GITHUB_OUTPUT

- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Build dex docker image' step
Uses Step
uses 'docker/login-action' with ref 'v3', not a pinned commit hash
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push (dex)
uses: docker/build-push-action@v6

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Build dex docker image' step
Uses Step
uses 'docker/build-push-action' with ref 'v6', not a pinned commit hash
with:
builder: ${{ steps.buildx.outputs.name }}
context: ./dex
target: dex
file: ./dex/${{matrix.image.dockerfile}}
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/netlogix/docker/dex:${{ matrix.image.version }},ghcr.io/netlogix/docker/dex:${{ steps.docker.outputs.version }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha, scope=${{ github.workflow }}-dex
cache-to: type=gha, scope=${{ github.workflow }}-dex, mode=max
4 changes: 4 additions & 0 deletions dex/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM ghcr.io/dexidp/dex:v2.43.1 AS dex

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s \
CMD wget --no-verbose --tries=1 --spider http://localhost:5556/dex/.well-known/openid-configuration || exit 1