Git Product home page Git Product logo

Comments (14)

chise0713 avatar chise0713 commented on July 30, 2024 1

www太麻烦的话不弄自动也行,偶尔上去删一下问题也不大

那我有空再整个自动删的,也不算麻烦,主要只是我现在不在家没办法写

from sstap-rule.

chise0713 avatar chise0713 commented on July 30, 2024

应该是,你可以试试看把rule修改为空文件,再重新跑一遍workflow。如果成功了就是上游没更新。
我去找找看有什么办法让workflow在上游更新时才run的方法。
不过上游每次都是force push掉原来的commit。
也可以把workflow文件脚本内的 git commit 加上 --allow-empty

from sstap-rule.

chise0713 avatar chise0713 commented on July 30, 2024

#545 修了

from sstap-rule.

NormanBB avatar NormanBB commented on July 30, 2024
    git checkout --orphan release-orphan
    git rm -rf .

    cp -rf dist/CN-ip-cidr.txt ./
    cp -rf dist/Country.mmdb ./

    git add Country.mmdb
    git add CN-ip-cidr.txt
    git commit -am "Updated at $(date)"

    git branch -D release
    git branch -m release

上游的做法是,切换到 orphan 分支 ,删除了 release 分支,将 orphan 分支命名为 release
一套下来后分支里仅存在一个 commit, 我个人不希望分支里存在许多空 commit。
@FQrabbit 你觉得呢?

from sstap-rule.

chise0713 avatar chise0713 commented on July 30, 2024

我个人不希望分支里存在许多空 commit。

明白了,我把PR关下。
如果还打算使用空提交就自己commit一个吧,我就不开PR了。

from sstap-rule.

FQrabbit avatar FQrabbit commented on July 30, 2024
    git checkout --orphan release-orphan
    git rm -rf .

    cp -rf dist/CN-ip-cidr.txt ./
    cp -rf dist/Country.mmdb ./

    git add Country.mmdb
    git add CN-ip-cidr.txt
    git commit -am "Updated at $(date)"

    git branch -D release
    git branch -m release

上游的做法是,切换到 orphan 分支 ,删除了 release 分支,将 orphan 分支命名为 release 一套下来后分支里仅存在一个 commit, 我个人不希望分支里存在许多空 commit。 @FQrabbit 你觉得呢?

确实没有空commit会好许多,看上去这样子切换分支逻辑没什么问题,但删除分支这种操作会不会有潜在问题,例如说删除分支之后新分支命名回原来名字的时候如果出错会怎么样.

from sstap-rule.

chise0713 avatar chise0713 commented on July 30, 2024

实际上我认为现在这样就可以,没必要修改。上游没更新咱也不需要更新,只是workflow失败比较不好看

可以在workflow脚本内添加判断条件,如果commit失败,那么使用 echo 输出上游未更新,然后 exit 0 ,这样应该可以缓解问题。

from sstap-rule.

FQrabbit avatar FQrabbit commented on July 30, 2024

实际上我认为现在这样就可以,没必要修改。上游没更新咱也不需要更新,只是workflow失败比较不好看

可以在workflow脚本内添加判断条件,如果commit失败,那么使用 echo 输出上游未更新,然后 exit 0 ,这样应该可以缓解问题。

现在fail不会commit的话,其实也没问题,workflow可以删除失败的事件么

from sstap-rule.

chise0713 avatar chise0713 commented on July 30, 2024

实际上我认为现在这样就可以,没必要修改。上游没更新咱也不需要更新,只是workflow失败比较不好看

可以在workflow脚本内添加判断条件,如果commit失败,那么使用 echo 输出上游未更新,然后 exit 0 ,这样应该可以缓解问题。

现在fail不会commit的话,其实也没问题,workflow可以删除失败的事件么

是指手动删还是指让workflow自动删。
前者的答案是可以,后者我记得也是可以的。
添加一个workflow,修改触发判断条件为当某个workflow complete,获取是否失败,如果为失败那么删除失败的workflow run。

from sstap-rule.

FQrabbit avatar FQrabbit commented on July 30, 2024

是指手动删还是指让workflow自动删。 前者的答案是可以,后者我记得也是可以的。 添加一个workflow,修改触发判断条件为当某个workflow complete,获取是否失败,如果为失败那么删除失败的workflow run。

www太麻烦的话不弄自动也行,偶尔上去删一下问题也不大

from sstap-rule.

chise0713 avatar chise0713 commented on July 30, 2024

#550
修了,让它判断上游是否更新,如果更新了但是无法commit才会报错。
之前失败的workflow run手动删下吧,我认为自动删会把真的出问题的也删掉,还是得留着。

from sstap-rule.

NormanBB avatar NormanBB commented on July 30, 2024

@KoinuDayo

#550 修了,让它判断上游是否更新,如果更新了但是无法commit才会报错。 之前失败的workflow run手动删下吧,我认为自动删会把真的出问题的也删掉,还是得留着。
Add: If Upstrean Updated but can't commit, it will return ERROR, and exit 1 .

shell: /usr/bin/bash -e {0}
From https://github.com/FQrabbit/SSTap-Rule
   7d69684..e[10](https://github.com/FQrabbit/SSTap-Rule/actions/runs/5908929299/job/16031908500#step:4:11)8fd9  master     -> origin/master
On branch master
Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	BypassCNandLan.rules

nothing added to commit but untracked files present (use "git add" to track)
Error: Process completed with exit code 1.

看起来还是有问题?

from sstap-rule.

chise0713 avatar chise0713 commented on July 30, 2024

@NormanBB
Screenshot_20230819-225630_GitHub.png

看起来是workflow checkout时没检出最新commit。
可以试试看在 git fetch 后面加上 git pull 。(⚠️非常不建议,如果旧commit出问题了,但是新commit问题不知道为什么消失了,那么重跑会导致无法debug⚠️
或只是github刚好抽风了,试试看手动跑一遍,我在自己fork的仓库内跑没办法复现,具体发生什么和为什么会这样,我不太明白。

Screenshot_20230819-230606_GitHub.png

正常的情况下最新commit的workflow应该是像这样的。

如果你是手动把之前的重新跑了的话,是不会使用最新commit的,得手动跑最新commit才会使用最新commit的内容。

from sstap-rule.

NormanBB avatar NormanBB commented on July 30, 2024

@KoinuDayo

如果你是手动把之前的重新跑了的话,是不会使用最新commit的,得手动跑最新commit才会使用最新commit的内容。

是的,你说得对
image
image

多谢您的贡献。

from sstap-rule.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.