3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-25 20:22:38 +01:00

Add GHCR workflow

See #1808
This commit is contained in:
Shivaram Lingamneni 2021-11-02 04:38:59 -04:00 committed by GitHub
parent c9b54ee2b8
commit 1ab2e9c294
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

37
.github/workflows/docker-image.yml vendored Normal file
View File

@ -0,0 +1,37 @@
name: 'ghcr'
on:
push:
branches:
- "master"
- "stable"
tags:
- 'v*'
jobs:
build:
name: 'Build'
runs-on: ubuntu-latest
steps:
- name: "Build:checkout"
uses: actions/checkout@v2
- name: "Build:meta"
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/ergochat/ergo
- name: "Build:login"
uses: docker/login-action@v1
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 'Build:dockerimage'
uses: docker/build-push-action@v2
with:
context: .
github_token: ${{ secrets.GITHUB_TOKEN }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}