Skip to content

Commit

Permalink
add pre tag
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed May 5, 2024
1 parent 0ece27e commit be30ab5
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 5 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/cks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ jobs:
token: ${{ secrets.RRORG }}
path: rr-cks

- name: Init Env
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
sudo timedatectl set-timezone "Asia/Shanghai"
- name: download to artifacts
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -209,6 +215,12 @@ jobs:
- name: Checkout
uses: actions/checkout@main

- name: Init Env
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
sudo timedatectl set-timezone "Asia/Shanghai"
- name: Calculate version
run: |
# Calculate version
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/lkms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ jobs:
- name: Checkout
uses: actions/checkout@main

- name: Init Env
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
sudo timedatectl set-timezone "Asia/Shanghai"
- name: Calculate version
run: |
# Calculate version
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,12 @@ jobs:
token: ${{ secrets.RRORG }}
path: rr-modules

- name: Init Env
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
sudo timedatectl set-timezone "Asia/Shanghai"
- name: download to artifacts
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -292,6 +298,12 @@ jobs:
- name: Checkout
uses: actions/checkout@main

- name: Init Env
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
sudo timedatectl set-timezone "Asia/Shanghai"
- name: Calculate version
run: |
# Calculate version
Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/rr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
sudo timedatectl set-timezone "Asia/Shanghai"
sudo apt update
sudo apt install -y jq cpio gettext
Expand All @@ -49,7 +50,9 @@ jobs:
- name: Calculate version
run: |
# Calculate version
TAGDATE="$(date +'%Y%m%d%H%M')"
VERSION=""
if [ -n "${{ inputs.version }}" ]; then
if [ "$(echo ${{ inputs.version }} | cut -d '.' -f 1,2)" = "$(date +'%y.%-m')" ]; then
VERSION="${{ inputs.version }}"
Expand All @@ -65,7 +68,9 @@ jobs:
VERSION=""
fi
echo "TAGDATE: ${TAGDATE}"
echo "VERSION: ${VERSION}"
echo "TAGDATE=${TAGDATE}" >>$GITHUB_ENV
echo "VERSION=${VERSION}" >>$GITHUB_ENV
if [ -n "${VERSION}" ]; then
Expand All @@ -74,7 +79,7 @@ jobs:
# Modify Source File
echo "${VERSION}" >VERSION
echo "${VERSION}" >files/mnt/p1/RR_VERSION
sed 's/^RR_VERSION=.*/RR_VERSION="'${VERSION}'"/' -i files/initrd/opt/rr/include/consts.sh
sed -i "s/^RR_VERSION=.*$/RR_VERSION=\"${VERSION}\"/" files/initrd/opt/rr/include/consts.sh
git checkout main
git pull
Expand All @@ -84,9 +89,13 @@ jobs:
git commit -m "update $(date +%Y-%m-%d" "%H:%M:%S)"
git push -f
fi
else
cd rr
sed -i "s/^RR_VERSION=.*$/RR_VERSION=\"${TAGDATE}\"/" files/initrd/opt/rr/include/consts.sh
fi
# Convert po2mo, Get extractor, LKMs, addons and Modules
# Convert po2mo, Get exts
- name: Convert po2mo, Get extractor, LKMs, addons and Modules
run: |
Expand All @@ -104,6 +113,10 @@ jobs:
getExtractor "files/mnt/p3/extractor"
echo "Repack initrd"
[ "${PRE}" = "true" ] && RELEASE="pre" || RELEASE=""
sed -i "s/^RR_RELEASE=.*$/RR_RELEASE=\"${RELEASE}\"/" files/initrd/opt/rr/include/consts.sh
convertpo2mo "files/initrd/opt/rr/lang"
repackInitrd "files/mnt/p3/initrd-rr" "files/initrd"
Expand Down Expand Up @@ -152,9 +165,9 @@ jobs:
- name: Pack
run: |
cd rr
TAGDATE="${{ env.TAGDATE }}"
VERSION="${{ env.VERSION }}"
VERSION="${VERSION:-"test"}"
VERSION="${VERSION:-"${TAGDATE}"}"
zip -9 "rr_1GB-${VERSION}.img.zip" rr_1GB.img
zip -9 "rr-${VERSION}.img.zip" rr.img
Expand Down Expand Up @@ -205,7 +218,7 @@ jobs:
if: success() && env.VERSION == ''
uses: actions/upload-artifact@v4
with:
name: rr-test
name: rr-${{ env.TAGDATE }}
path: |
rr/rr-*.zip
rr/update*.zip
Expand Down

0 comments on commit be30ab5

Please sign in to comment.