Skip to content
This repository has been archived by the owner on Sep 22, 2024. It is now read-only.

chore(deps): update actions/checkout action to v4 (#355) #359

chore(deps): update actions/checkout action to v4 (#355)

chore(deps): update actions/checkout action to v4 (#355) #359

name: Publish Docker Image
on:
push:
branches:
- main
jobs:
build_images:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- context: ./oidc_api
image: oidc-api
- context: ./oidc_app
image: oidc-app
- context: ./oidc_provider
image: oidc-provider
- context: ./basic_auth_api
image: basic-auth-api
- context: ./basic_auth_app
image: basic-auth-app
- context: ./basic_auth_backend_app
image: basic-auth-backend-app
name: Build ${{ matrix.image }} Docker image
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v4
with:
context: ${{ matrix.context }}
file: ${{ matrix.context }}/Dockerfile
push: true
build-args: |
COMMIT_SHA=${{ github.sha }}
tags: |
ghcr.io/wirepact/demo-applications/${{ matrix.image }}:latest
ghcr.io/wirepact/demo-applications/${{ matrix.image }}:${{ github.sha }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}