Skip to content

Commit

Permalink
ci: add a workflow to build images
Browse files Browse the repository at this point in the history
  • Loading branch information
TPXP committed May 27, 2024
1 parent 3fb106f commit 377236f
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy Images to GHCR

on:
release:
types:
- released
workflow_dispatch:

permissions:
packages: write
contents: read

jobs:
build-docker-image:
runs-on: ubuntu-latest
steps:
- name: 'Checkout repo'
uses: actions/checkout@main

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }}

0 comments on commit 377236f

Please sign in to comment.