mirror of https://github.com/ghostfolio/ghostfolio
1 changed files with 50 additions and 0 deletions
@ -0,0 +1,50 @@ |
|||
name: Docker image CD (main, GHCR) |
|||
|
|||
on: |
|||
push: |
|||
branches: |
|||
- 'main' |
|||
|
|||
permissions: |
|||
contents: read |
|||
packages: write |
|||
|
|||
jobs: |
|||
build_and_push: |
|||
runs-on: ubuntu-latest |
|||
steps: |
|||
- name: Checkout code |
|||
uses: actions/checkout@v4 |
|||
|
|||
- name: Docker metadata |
|||
id: meta |
|||
uses: docker/metadata-action@v5 |
|||
with: |
|||
images: ghcr.io/${{ github.repository_owner }}/ghostfolio |
|||
tags: | |
|||
type=raw,value=main |
|||
type=sha,prefix=sha- |
|||
|
|||
- name: Set up QEMU |
|||
uses: docker/setup-qemu-action@v3 |
|||
|
|||
- name: Set up Docker Buildx |
|||
uses: docker/setup-buildx-action@v3 |
|||
|
|||
- name: Login to GHCR |
|||
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@v6 |
|||
with: |
|||
context: . |
|||
platforms: linux/amd64 |
|||
push: true |
|||
tags: ${{ steps.meta.outputs.tags }} |
|||
labels: ${{ steps.meta.outputs.labels }} |
|||
cache-from: type=gha |
|||
cache-to: type=gha,mode=max |
|||
Loading…
Reference in new issue