react/.forgejo/workflows/build.yml
jank 2f4fafd749
All checks were successful
Build and Push Docker Image / Build (push) Successful in 21s
chore: Update credentials
2025-09-15 08:48:54 +02:00

49 lines
1.2 KiB
YAML

name: Build and Push Docker Image
run-name: Build and Push Docker Image
on:
workflow_run:
workflows: ["Release"]
types:
- completed
branches:
- main
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Extract tag
run: |
TAG=$(git describe --tags --abbrev=0)
echo "TAG=$TAG" >> $GITHUB_ENV
- uses: actions/setup-node@v5
with:
node-version: 24
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Build
run: bun run build
- name: Docker login
uses: docker/login-action@v1
with:
registry: git.kjan.de
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: |
git.kjan.de/templates/react:dev