mirror of
https://github.com/leoncvlt/loconotion.git
synced 2024-08-30 18:12:12 +00:00
45 lines
1.0 KiB
YAML
45 lines
1.0 KiB
YAML
|
name: Docker Image
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- '**'
|
||
|
tags:
|
||
|
- 'v*.*.*'
|
||
|
pull_request:
|
||
|
branches:
|
||
|
- 'master'
|
||
|
|
||
|
jobs:
|
||
|
build-and-push-docker-image:
|
||
|
name: Build Docker image and push to repository
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
steps:
|
||
|
- name: Checkout code
|
||
|
uses: actions/checkout@v2
|
||
|
|
||
|
- name: Docker meta
|
||
|
id: meta
|
||
|
uses: docker/metadata-action@v3
|
||
|
with:
|
||
|
images: ghcr.io/${{ github.repository }}
|
||
|
|
||
|
- name: Set up Docker Buildx
|
||
|
uses: docker/setup-buildx-action@v1
|
||
|
|
||
|
- name: Login to Github Packages
|
||
|
uses: docker/login-action@v1
|
||
|
with:
|
||
|
registry: ghcr.io
|
||
|
username: ${{ github.actor }}
|
||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||
|
|
||
|
- name: Build image and push to GitHub Container Registry
|
||
|
uses: docker/build-push-action@v2
|
||
|
with:
|
||
|
file: ./docker/Dockerfile
|
||
|
tags: ${{ steps.meta.outputs.tags }}
|
||
|
labels: ${{ steps.meta.outputs.labels }}
|
||
|
push: true
|