ci: fix codeberg secret name typo, escape badge date, guard profile step
This commit is contained in:
parent
8c7e6a4d76
commit
0e1a375af6
1 changed files with 11 additions and 7 deletions
|
|
@ -189,7 +189,7 @@ jobs:
|
|||
|
||||
# Push public to Codeberg when all checks pass — nightly mirror.
|
||||
# Also updates the .profile README with latest release badges and
|
||||
# recent activity. Requires CODECBERG_TOKEN secret in the repo settings.
|
||||
# recent activity. Requires CODEBERG_TOKEN secret in the repo settings.
|
||||
sync-codeberg:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [go-vet, go-test, rust-test, cross-compile, web-build, installer-integrity, no-ai-attribution, action-pins]
|
||||
|
|
@ -200,18 +200,22 @@ jobs:
|
|||
fetch-depth: 0
|
||||
- name: Push public to Codeberg
|
||||
run: |
|
||||
if [ -z "${{ secrets.CODECBERG_TOKEN }}" ]; then
|
||||
echo "[INFO] [sync] CODECBERG_TOKEN not set — skipping codeberg push"
|
||||
if [ -z "${{ secrets.CODEBERG_TOKEN }}" ]; then
|
||||
echo "[INFO] [sync] CODEBERG_TOKEN not set — skipping codeberg push"
|
||||
exit 0
|
||||
fi
|
||||
git remote add codeberg-ci "https://${{ secrets.CODECBERG_TOKEN }}@codeberg.org/Fimeg/RedFlag.git"
|
||||
git remote add codeberg-ci "https://${{ secrets.CODEBERG_TOKEN }}@codeberg.org/Fimeg/RedFlag.git"
|
||||
git push codeberg-ci public:public
|
||||
echo "Pushed public to codeberg.org/Fimeg/RedFlag"
|
||||
|
||||
- name: Update profile README
|
||||
run: |
|
||||
set -euo pipefail
|
||||
TOKEN="${{ secrets.CODECBERG_TOKEN }}"
|
||||
TOKEN="${{ secrets.CODEBERG_TOKEN }}"
|
||||
if [ -z "$TOKEN" ]; then
|
||||
echo "[INFO] [sync] CODEBERG_TOKEN not set — skipping profile update"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Clone the .profile repo
|
||||
git clone "https://${TOKEN}@codeberg.org/Fimeg/.profile.git" /tmp/profile
|
||||
|
|
@ -259,8 +263,8 @@ for e in events:
|
|||
echo "Activity:"
|
||||
cat /tmp/activity.md
|
||||
|
||||
# Stamp badges
|
||||
TODAY=$(date -u +%Y-%m-%d)
|
||||
# Stamp badges. shields.io needs literal dashes escaped as --
|
||||
TODAY=$(date -u +%Y--%m--%d)
|
||||
sed -i "s|RedFlag-v[^ ]*-green|RedFlag-${RF_VER}-green|" README.md
|
||||
sed -i "s|Souveraine-[^ ]*-blue|Souveraine-${SV_VER}-blue|" README.md
|
||||
sed -i "s|Updated-[^ ]*-gray|Updated-${TODAY}-gray|" README.md
|
||||
|
|
|
|||
Loading…
Reference in a new issue