ci: migrate to github actions
Some checks failed
Generate Checksums / checksums (push) Failing after 3m38s
Some checks failed
Generate Checksums / checksums (push) Failing after 3m38s
This commit is contained in:
parent
f17d5a8857
commit
b7686f1639
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1,4 +1,4 @@
|
|||||||
* filter=lfs diff=lfs merge=lfs -text
|
* filter=lfs diff=lfs merge=lfs -text
|
||||||
.gitattributes !filter !diff !merge
|
.gitattributes !filter !diff !merge
|
||||||
.gitlab-ci.yml !filter !diff !merge
|
.github/** !filter !diff !merge
|
||||||
README.md !filter !diff !merge
|
README.md !filter !diff !merge
|
||||||
|
8
.github/workflows/checksums.yml
vendored
8
.github/workflows/checksums.yml
vendored
@ -6,13 +6,12 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
jobs:
|
jobs:
|
||||||
checksums:
|
checksums:
|
||||||
runs-on: ubuntu-latest
|
runs-on: cn
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
lfs: true
|
lfs: true
|
||||||
|
|
||||||
- name: Generate checksums
|
- name: Generate checksums
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
@ -21,8 +20,7 @@ jobs:
|
|||||||
filename=$(basename "$file");
|
filename=$(basename "$file");
|
||||||
sha256sum -b "$file" | sed "s|$file|$filename|" > "${file}.sha256";
|
sha256sum -b "$file" | sed "s|$file|$filename|" > "${file}.sha256";
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
uses: stefanzweifel/git-auto-commit-action@v5
|
uses: actions/git-auto-commit-action@v5
|
||||||
with:
|
with:
|
||||||
commit_message: "chore: update checksum files"
|
commit_message: "chore: update checksum files"
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
checksums:
|
|
||||||
image: alpine:latest
|
|
||||||
before_script:
|
|
||||||
- sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
|
|
||||||
- apk add --no-cache git git-lfs
|
|
||||||
- git config --global user.name "CI"
|
|
||||||
- git config --global user.email "ci@haozi.net"
|
|
||||||
- git remote set-url origin "https://gitlab-ci-token:${GITLAB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
|
|
||||||
- git config lfs.https://gitlab-ci-token:${GITLAB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git/info/lfs.locksverify true
|
|
||||||
- git checkout -f $CI_COMMIT_REF_NAME
|
|
||||||
script: |
|
|
||||||
set -e
|
|
||||||
IFS=$'\n'
|
|
||||||
git fetch origin
|
|
||||||
git reset --hard origin/$CI_COMMIT_REF_NAME
|
|
||||||
for file in $(git ls-files | grep "^panel/" | grep -v ".sha256$" | grep -v ".txt$"); do
|
|
||||||
filename=$(basename "$file");
|
|
||||||
sha256sum -b "$file" | sed "s|$file|$filename|" > "${file}.sha256";
|
|
||||||
done
|
|
||||||
git add -A
|
|
||||||
git commit -m "chore: update checksum files" || true
|
|
||||||
git push origin $CI_COMMIT_REF_NAME
|
|
||||||
unset IFS
|
|
Loading…
x
Reference in New Issue
Block a user