TangHuan 894f8a8f7c
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1m32s
修改仓库地址
2025-05-06 11:48:56 +08:00

56 lines
1.7 KiB
YAML

name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
vars:
ACTIONS_RUNNER_DEBUG: true
steps:
- name: 克隆代码
uses: actions/checkout@v4
# 缓存 Maven 依赖
# - name: Cache Jdk download
# uses: https://gitea.com/actions/cache@v3
# with:
# path: $RUNNER_TEMP/java_package.tar.gz
# key: ${{ runner.os }}-jdk-17.0.14
# restore-keys: ${{ runner.os }}-jdk-17.0.14
#
# - name: 下载jdk
# run: |
# download_url="https://mirrors.tuna.tsinghua.edu.cn/Adoptium/17/jdk/x64/linux/OpenJDK17U-jdk_x64_linux_hotspot_17.0.14_7.tar.gz"
# wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
- uses: actions/setup-node@v4
with:
# Version Spec of the version to use in SemVer notation.
# It also admits such aliases as lts/*, latest, nightly and canary builds
# Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node
node-version: 'node'
cache: "npm"
# 缓存 Maven 依赖
- name: 安装依赖
run: npm ci
- name: 编译
run: npm run build
- name: Login to Gitea Container Registry
uses: docker/login-action@v2
with:
registry: git.pintantan.com
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ vars.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: git.pintantan.com/${{gitea.repository}}:demo-1.0.0