From 7ae173c7cb165d2dc6243e63f1356772d8634ec2 Mon Sep 17 00:00:00 2001 From: "timo.bergen" Date: Wed, 12 Jul 2023 14:17:37 +0200 Subject: [PATCH] Init --- .../Build-Dockerfile-and-publish.yaml | 34 +++++++++++++++++++ Dockerfile | 10 ++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/Build-Dockerfile-and-publish.yaml create mode 100644 Dockerfile diff --git a/.github/workflows/Build-Dockerfile-and-publish.yaml b/.github/workflows/Build-Dockerfile-and-publish.yaml new file mode 100644 index 0000000..9c7c7cb --- /dev/null +++ b/.github/workflows/Build-Dockerfile-and-publish.yaml @@ -0,0 +1,34 @@ +name: build-and-push + +on: + push: + branches: + - 'main' + paths-ignore: + - '**.md' + + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to Docker Hub + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GHCR_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v4 + with: + push: true + tags: ghcr.io/camao-tec/ansible:latest + platforms: linux/amd64,linux/arm64 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..dd1c288 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM python:3.9-slim-buster + +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + ssh && \ + rm -rf /var/lib/apt/lists/* + +RUN pip install ansible + +CMD [ "ansible-playbook", "--version" ]