Docker #9
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: Docker | |
on: # yamllint disable-line rule:truthy | |
workflow_dispatch: | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_BASE_NAME: ${{ github.repository_owner }}/dse | |
jobs: | |
container: | |
runs-on: [ubuntu-latest] | |
strategy: | |
matrix: | |
image: | |
- gcc-builder | |
- python-builder | |
- clang-format | |
- flatc-builder | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}-${{ matrix.image }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
context: ./extra/docker/${{ matrix.image }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |