[Chore] Build and publish dev image workflow (#898)

This commit is contained in:
Alex Justesen authored and GitHub committed 2023-11-11 21:54:33 -05:00
1 parent 190c96b63f
commit 293f85bd32
1 file changed
+53
+53
View File
@@ -0,0 +1,53 @@
name: Build and push dev Docker images
on:
push:
branches:
- main
schedule:
- cron: '0 4 * * *'
env:
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
jobs:
build_and_push_image:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=raw,value=dev
- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: ${{ env.PLATFORMS }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}