Update .gitea/build.yml

This commit is contained in:
2026-03-13 20:04:52 +00:00
parent bac2259a1a
commit f24d9f72a6

View File

@@ -1,39 +1,39 @@
name: Build and Push Docker Image to Gitea Registry name: Build and Push Docker Image to Gitea Registry
on: on:
push: push:
branches: branches:
- main - main
workflow_dispatch: workflow_dispatch:
jobs: jobs:
build-and-push: build-and-push:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# Step 1: Checkout repository # Step 1: Checkout repository
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
# Step 2: Set up Docker Buildx # Step 2: Set up Docker Buildx
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
# Step 3: Log in to Gitea Container Registry # Step 3: Log in to Gitea Container Registry
- name: Log in to Gitea Registry - name: Log in to Gitea Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.3t.network registry: git.3t.network
username: $alex username: $alex
password: ${{ secrets.PACKAGEKEY }} password: ${{ secrets.PACKAGEKEY }}
# Step 4: Build and push Docker image # Step 4: Build and push Docker image
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
push: true push: true
tags: | tags: |
git.3t.network/${{ github.repository }}/static-site:${{ github.sha }} git.3t.network/${{ github.repository }}/static-site:${{ github.sha }}
git.3t.network/${{ github.repository }}/static-site:latest git.3t.network/${{ github.repository }}/static-site:latest
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max