Added Github Action to build the docker image and push it to GHCR - experimental

This commit is contained in:
ShadowArcanist
2025-01-08 09:51:21 +05:30
parent a2fbccaecd
commit b3b4552d57
5 changed files with 38 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
name: Build and Push Docker Image
on:
push:
branches:
- master
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v3
# Log in to GHCR
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Build and push the Docker image for ARM Linux
- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
platforms: linux/arm64