Skip to content

update readme

update readme #44

name: docker-ansible-ubuntu2004
on:
push:
paths:
- '.github/workflows/docker-ansible-ubuntu2004.yml'
- 'docker_builds/docker-ansible-ubuntu2004/**'
- '!docker_builds/docker-ansible-ubuntu2004/*.md'
jobs:
buildx:
runs-on: ubuntu-latest
env:
VERSION: $(cat docker_builds/docker-ansible-ubuntu2004/.version)
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
-
name: Cache Docker layers
uses: actions/cache@v2
id: cache
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
-
name: Docker Buildx (build)
run: |
docker buildx build \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--platform linux/amd64,linux/arm/v7,linux/arm64 \
--output "type=image,push=false" \
--tag enros/docker-ansible-ubuntu2004:latest \
--file ./docker_builds/docker-ansible-ubuntu2004/Dockerfile \
./docker_builds/docker-ansible-ubuntu2004/
-
name: Login to GitHub Docker Registry
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin
-
name: Docker Buildx (push)
run: |
docker buildx build \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--platform linux/amd64,linux/arm/v7,linux/arm64 \
--output "type=image,push=true" \
--tag enros/docker-ansible-ubuntu2004:latest \
--file ./docker_builds/docker-ansible-ubuntu2004/Dockerfile \
./docker_builds/docker-ansible-ubuntu2004/
-
name: Docker Check Manifest
run: |
docker run --rm mplatform/mquery enros/docker-ansible-ubuntu2004:latest
-
name: Clear
if: always()
run: |
rm -f ${HOME}/.docker/config.json