Skip to content

change triger workflow and multi platforms (#3) #4

change triger workflow and multi platforms (#3)

change triger workflow and multi platforms (#3) #4

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- main # Trigger workflow on push to the main branch
pull_request:
branches:
- main # Optional: Run the workflow on PRs targeting main
jobs:
build-and-push:
runs-on: image-builder
permissions:
contents: read
packages: write # Required to push to GitHub Container Registry
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.ACCESS_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/arm64,linux/amd64
push: true
tags: ghcr.io/${{ github.repository }}:latest