Build ansible image with github actions

This commit is contained in:
Arnaud Lafon
2023-08-15 10:20:43 +02:00
parent 9392578eaf
commit 0fe8d79fb0
2 changed files with 41 additions and 3 deletions

41
.github/workflows/docker.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: ci
on:
push:
branches:
- 'master'
jobs:
ansible-build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image: ansible
subdir: debian-buster
- image: ansible
subdir: debian-buster-tools
- image: ansible
subdir: ezplatform-toolbox
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
context: "./${{ matrix.image }}/${{ matrix.subdir }}"
file: ./Dockerfile
push: true
tags: "${{ matrix.image }}:${{ matrix.subdir }}:latest"

View File

@@ -2,9 +2,6 @@ services:
- docker
env:
matrix:
- IMAGE=ansible VERSION=debian-buster
- IMAGE=ansible VERSION=debian-buster-tools
- IMAGE=ansible VERSION=ezplatform-toolbox
- IMAGE=docker-compose VERSION=latest
- IMAGE=docker-compose VERSION=19.03.1
- IMAGE=docker-compose VERSION=19.03.1-dind