mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
924 B
42 lines
924 B
name: Docker Image CI
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
release:
|
|
push:
|
|
tags:
|
|
- '*.*.*'
|
|
|
|
jobs:
|
|
|
|
build_and_push:
|
|
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@v4
|
|
with:
|
|
images: ghostfolio/ghostfolio
|
|
tags: |
|
|
type=ref,event=tag
|
|
flavor: |
|
|
latest=true
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|