push #13991
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: [cypress, node-chrome, eoan-xfce-novnc, gitpod, gitpod-monorepo, monorepo-modules, rolling-devcontainer, bookworm-devcontainer, jammy-devcontainer, jammy-xubuntu-desktop] | |
platform: [ linux/amd64, linux/arm64] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Docker Login | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Extract version | |
id: extract_version | |
uses: Saionaro/[email protected] | |
with: | |
path: packages/${{ matrix.image-name }} | |
- name: Build and push | |
uses: docker/[email protected] | |
with: | |
context: ./ | |
file: ./packages/${{ 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 |