36 lines
911 B
YAML
36 lines
911 B
YAML
|
|
# Forgejo Action — build + publish Docker image to Forgejo container registry on merge to main
|
||
|
|
---
|
||
|
|
name: Docker
|
||
|
|
|
||
|
|
on:
|
||
|
|
push:
|
||
|
|
branches: [main]
|
||
|
|
|
||
|
|
concurrency:
|
||
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||
|
|
cancel-in-progress: true
|
||
|
|
|
||
|
|
jobs:
|
||
|
|
docker:
|
||
|
|
runs-on: ubuntu-latest
|
||
|
|
steps:
|
||
|
|
- uses: actions/checkout@v4
|
||
|
|
|
||
|
|
- name: Set up Docker Buildx
|
||
|
|
uses: docker/setup-buildx-action@v3
|
||
|
|
|
||
|
|
- name: Log in to Forgejo Container Registry
|
||
|
|
uses: docker/login-action@v3
|
||
|
|
with:
|
||
|
|
registry: forgejo.lorentz.is
|
||
|
|
username: ${{ github.actor }}
|
||
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||
|
|
|
||
|
|
- name: Build and push Docker image
|
||
|
|
uses: docker/build-push-action@v5
|
||
|
|
with:
|
||
|
|
context: .
|
||
|
|
push: true
|
||
|
|
tags: |
|
||
|
|
forgejo.lorentz.is/matt/mailship:${{ github.sha }}
|
||
|
|
forgejo.lorentz.is/matt/mailship:latest
|