Skip to content

Commit

Permalink
build customized image with guest branch to ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzy823 committed Sep 15, 2024
1 parent 071fa99 commit 7152251
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/customize-build-guest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Customize Build (guest token) with ghcr.io

on:
push:
paths-ignore:
- "README.md"
branches:
- guest__customize

env:
REGISTRY: ghcr.io

jobs:
build-docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
version: latest
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ env.REGISTRY }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository }}:guest,${{ env.REGISTRY }}/${{ github.repository }}:guest-${{ github.sha }}

0 comments on commit 7152251

Please sign in to comment.