Skip to content

add valid base tag name but disable its use (#397) #3

add valid base tag name but disable its use (#397)

add valid base tag name but disable its use (#397) #3

name: Dev Container Build and Push Image
on:
push:
tags:
- "devcontainer/v*.*.*"
jobs:
devcontainer-build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
# disable tag base name because devcontainers cli automatically adds it based on the "imageName" input
images: |
ghcr.io/${{ github.repository }}/devcontainer
enable=false
# generate Docker tags based on the following events/attributes
tags: |
type=match,pattern=devcontainer/v(\d.\d.\d),group=1
sep-tags: ","
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and release devcontainer Multi-Platform
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/${{ github.repository }}/devcontainer
imageTag: ${{ steps.meta.outputs.tags }}
cacheFrom: ghcr.io/${{ github.repository }}/devcontainer
platform: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
subFolder: .github