diora-web/.forgejo/workflows/docker.yml
marwin e55dba66e4
Some checks failed
Build and push Docker image / build (push) Failing after 11s
Add Dockerfile and Forgejo Actions workflow for Docker builds
2026-03-16 19:24:06 +01:00

38 lines
892 B
YAML

name: Build and push Docker image
on:
push:
branches:
- master
- testing
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set image tag
id: tag
run: |
if [ "${{ github.ref_name }}" = "master" ]; then
echo "tag=latest" >> $GITHUB_OUTPUT
else
echo "tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT
fi
- name: Log in to Forgejo registry
uses: docker/login-action@v3
with:
registry: fg.creamfresh.xyz
username: ${{ github.actor }}
password: ${{ secrets.FORGEJO_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: fg.creamfresh.xyz/mrwnslz/diora-web:${{ steps.tag.outputs.tag }}