Skip to content

switch to matrix strategy, add oidc flavor for nginx #8

switch to matrix strategy, add oidc flavor for nginx

switch to matrix strategy, add oidc flavor for nginx #8

Workflow file for this run

name: Docker
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
branches: [gh-images]
# Publish semver tags as releases.
tags: ["v*.*.*"]
env:
REGISTRY: ghcr.io
REGISTRY_WITH_PATH: ghcr.io/${{ github.repository_owner }}
jobs:
build-push-image:
strategy:

Check failure on line 20 in .github/workflows/docker-publish.yml

View workflow run for this annotation

GitHub Actions / Docker

Invalid workflow file

The workflow is not valid. .github/workflows/docker-publish.yml (Line: 20, Col: 14): Unexpected value '' .github/workflows/docker-publish.yml (Line: 21, Col: 5): Unexpected value 'matrix'
matrix:
image: [secrets, nginx, service, enketo]
build_args: [""]
flavor: [""]
include:
- image: nginx
flavor: |
prefix=oidc,onlatest=true
build_args: |
OIDC_ENABLED=true
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update -i
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY_WITH_PATH }}/central-${{ matrix.image }}
flavor: ${{ matrix.flavor }}
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}.{{hotfix}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Build and push ${{ matrix.image }} Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
file: ${{ matrix.image }}.dockerfile
context: .
build-args: ${{ matrix.build_args }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}