You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
906 B
YAML
41 lines
906 B
YAML
name: Docker Image CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
# Authenticate to the container registry
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_PAT }}
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
# Build and push Docker image with Buildx
|
|
- name: Build and push
|
|
id: build-and-push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
sbom: true
|
|
provenance: true
|
|
platforms: linux/arm64,linux/amd64
|
|
tags: graystorm/amcrest2mqtt:latest
|
|
push: true
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|