Skip to content

ci(publish): 更新 Docker 镜像发布配置 #2

ci(publish): 更新 Docker 镜像发布配置

ci(publish): 更新 Docker 镜像发布配置 #2

Workflow file for this run

name: flow
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"
push:
branches:
- main
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Make Workdir
run: |
mkdir -p /work
cd /work
git clone https://github.com/go-gitea/gitea.git
git apply ../oauth.go.patch
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository }}/gitea:${{ github.sha }}
ghcr.io/${{ github.repository }}/gitea/gitea:latest