Skip to content

Merge pull request #1 from chaddyc/feature/multi-build-containers #1

Merge pull request #1 from chaddyc/feature/multi-build-containers

Merge pull request #1 from chaddyc/feature/multi-build-containers #1

Workflow file for this run

name: Docker Build
on:
push:
branches:
- main
jobs:
docker-build:
if: ${{ github.ref == 'refs/heads/main' && contains('["chaddyc"]', github.actor) }}
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ github.token }}
REPO: ${{ github.event.repository.name }}
steps:
- name: Checkout code
uses: actions/checkout@4
- name: Set up QEM
uses: docker/setup-qemu-action@3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push ubuntu latest
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
build-arg: UBUNTU_VERSION=latest
push: true
tags: chaddyc/${{ github.event.repository.name }}:latest
- name: Build and push ubuntu 24.04
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
build-arg: UBUNTU_VERSION=24.04
push: true
tags: chaddyc/${{ github.event.repository.name }}:24.04
- name: Build and push ubuntu 22.04
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
build-arg: UBUNTU_VERSION=22.04
push: true
tags: chaddyc/${{ github.event.repository.name }}:22.04
# - name: Update docker readme description
# uses: peter-evans/dockerhub-description@v3
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# repository: chaddyc/${{ github.event.repository.name }}