Skip to content

Build this Docker image #168

Build this Docker image

Build this Docker image #168

Workflow file for this run

---
name: Build this Docker image
on:
workflow_dispatch:
push:
schedule:
- cron: '11 23 * * 0'
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Checkout Repo
uses: actions/checkout@v3
with:
ref: master
path: repo
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push Python
id: docker_build
uses: docker/build-push-action@v3
with:
push: true
tags: devopsansiblede/python:latest
no-cache: true
context: ./repo/
file: ./repo/Dockerfile
platforms: linux/amd64,linux/arm64
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Last Built
run: sed -i -E "s/^[0-9]{4}-[0-9]{2}-[0-9]{2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}$/$( date +"%Y-%m-%d %T" )/" ./repo/README.md
- name: Commit last built information
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Last built
commit_user_name: GitHub Actions
commit_user_email: dev@macwinnie.me
repository: ./repo/
...