mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 17:37:02 +03:00
Push to ghcr.io
This commit is contained in:
parent
f1d1c175f9
commit
7ac893b179
2 changed files with 20 additions and 0 deletions
|
|
@ -23,6 +23,9 @@ RUN set -eux; \
|
|||
FROM php:8.1-fpm-alpine AS final
|
||||
|
||||
LABEL org.label-schema.description="SnappyMail webmail client image using nginx, php-fpm on Alpine"
|
||||
LABEL org.opencontainers.image.source=https://github.com/the-djmaze/snappymail
|
||||
LABEL org.opencontainers.image.description="SnappyMail"
|
||||
LABEL org.opencontainers.image.licenses="AGPL v3.0"
|
||||
|
||||
# Install dependencies such as nginx
|
||||
RUN apk add --no-cache ca-certificates nginx supervisor bash
|
||||
|
|
|
|||
17
.github/workflows/docker.yml
vendored
17
.github/workflows/docker.yml
vendored
|
|
@ -1,13 +1,21 @@
|
|||
name: docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '**'
|
||||
# TODO: Remove this before merging PR
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
# This is needed to push to GitHub Container Registry. See https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -16,12 +24,14 @@ jobs:
|
|||
uses: actions/checkout@v3
|
||||
|
||||
# This step generates the docker tags
|
||||
# TODO: Remove type=ref,event=pr before merging PR
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
${{ github.repository }}
|
||||
ghcr.io/${{ github.repository }}
|
||||
# type=ref,event=pr generates tag(s) on PRs only. E.g. 'pr-123', 'pr-123-abc0123'
|
||||
# type=ref,event=branch generates tag(s) on branch only. E.g. 'master', 'master-abc0123'
|
||||
# type=ref,event=tag generates tag(s) on tags only. E.g. 'v0.0.0', 'v0.0.0-abc0123', and 'latest'
|
||||
|
|
@ -55,6 +65,13 @@ jobs:
|
|||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
id: build-and-push
|
||||
uses: docker/build-push-action@v3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue