试着加个这玩意 Fix | 应该是 r+ auto update with Gitea Actions 尝试一些新东西( 我的问题( auto update with Gitea Actions 2? 待会得 squash了 auto update with Gitea Actions 好好好 now? auto update with Gitea Actions 是这样? reeee 好好好 再试一次 得了,新建一个分支吧 try try 忘记 push -f 了(
47 lines
1.6 KiB
YAML
47 lines
1.6 KiB
YAML
name: Gitea Actions Demo
|
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
|
on: [push]
|
|
|
|
jobs:
|
|
Explore-Gitea-Actions:
|
|
runs-on: node-21
|
|
# 目前稳定能使用的 runner 就是 node 21 了
|
|
steps:
|
|
- name: 各种事件展示
|
|
run: |
|
|
echo "任务是由 ${{ gitea.event_name }} 事件触发的"
|
|
echo "你的分支是 ${{ gitea.ref }}"
|
|
echo "你的仓库是 ${{ gitea.repository }}"
|
|
|
|
- name: Check out repository code
|
|
uses: http://shenjack.top:5100/mirror/checkout@v4
|
|
|
|
- name: 展示其他信息
|
|
run: |
|
|
echo "你的分支是 ${{ gitea.ref }}"
|
|
echo "你的仓库是 ${{ gitea.repository }}"
|
|
echo "你的仓库地址是 ${{ gitea.repository_url }}"
|
|
echo "你的仓库路径是 ${{ gitea.workspace }}"
|
|
echo "你的仓库地址是 ${{ gitea.workspace_url }}"
|
|
echo "这个 Action 的运行状态是 ${{ job.status }}"
|
|
echo ls ${{ gitea.workspace }}
|
|
|
|
- name: 展示 python 版本
|
|
run: |
|
|
python3 test.py
|
|
python3 -c "import sys;print(sys.version)"
|
|
python3 run.py
|
|
|
|
- name: 推送修改
|
|
run: |
|
|
git config user.name gitea-actions
|
|
git config user.email gitea-action@shenjack.top
|
|
git add .
|
|
git commit -m "auto update with Gitea Actions"
|
|
# 创建并切换到deploy分支
|
|
git checkout -b deploy
|
|
# 将更改添加到deploy分支的最新提交
|
|
git commit --amend --no-edit
|
|
# 推送到deploy分支
|
|
git push origin HEAD --force
|