Skip to content

Docker Image CI

Docker Image CI #28

Workflow file for this run

name: Docker Image CI
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 2 */14 * *'
workflow_dispatch:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ github.repository_owner }}/creativetonie:latest
${{ github.repository_owner }}/creativetonie:${{ env.SHORT_SHA }}