Skip to content

Workflow file for this run

name: Update DockerHub Images
on:
push:
branches:
- main
tags:
- v*
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image-name: [ rolling-devcontainer, bookworm-devcontainer, trixie-devcontainer, jammy-xubuntu-desktop]
platform: [ linux/amd64, linux/arm64]
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/[email protected]
- name: Docker Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Extract version
id: extract_version
uses: Saionaro/[email protected]
with:
path: devcontainers/${{ matrix.image-name }}
- name: Build and push
uses: docker/[email protected]
with:
context: ./
file: ./devcontainers/${{ matrix.image-name }}/Dockerfile
push: true
platforms: ${{ matrix.platform }}
tags: devimages/${{ matrix.image-name }}:${{ steps.extract_version.outputs.version }},devimages/${{ matrix.image-name }}:latest
cache-from: type=registry,ref=devimages/${{ matrix.image-name }}:buildcache
cache-to: type=registry,ref=devimages/${{ matrix.image-name }}:buildcache,mode=max