Fix gitea workflows
Syntax Check / syntax-check (push) Failing after 24s

This commit is contained in:
alvinlollo
2026-09-14 17:21:38 +10:00
parent c126b5ce18
commit 568c64d40b
3 changed files with 61 additions and 52 deletions
+28 -8
View File
@@ -17,12 +17,12 @@ jobs:
- name: Install archiso and dependencies
run: |
sudo pacman -Syu --noconfirm archiso
pacman -Syu --noconfirm archiso jq
- name: Build Arch ISO
run: |
# Replace 'releng' with your custom profile directory if needed
sudo mkarchiso -v -w work -o out/ releng
mkarchiso -v -w work -o out/ releng
- name: Generate Unique Dynamic Tag
id: tag
@@ -46,13 +46,33 @@ jobs:
echo "release_name=Arch Linux ISO (${BASE_DATE} Rev ${REVISION})" >> $GITHUB_OUTPUT
- name: Create Release and Upload ISO
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag.outputs.tag_name }}
name: ${{ steps.tag.outputs.release_name }}
files: out/*.iso
env:
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
SERVER_URL: ${{ github.server_url }}
REPOSITORY: ${{ github.repository }}
TAG_NAME: ${{ steps.tag.outputs.tag_name }}
RELEASE_NAME: ${{ steps.tag.outputs.release_name }}
run: |
# Create the release via Gitea API
RELEASE_ID=$(curl -s -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
"$SERVER_URL/api/v1/repos/$REPOSITORY/releases" \
-d "{\"tag_name\": \"$TAG_NAME\", \"name\": \"$RELEASE_NAME\"}" \
| jq -r '.id')
echo "Created release ID: $RELEASE_ID"
# Upload each ISO as a release asset
for iso in out/*.iso; do
echo "Uploading $iso..."
curl -s -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-F "attachment=@$iso" \
"$SERVER_URL/api/v1/repos/$REPOSITORY/releases/$RELEASE_ID/assets"
done
echo "Release $TAG_NAME created and ISOs uploaded."
- name: Keep only latest 3 releases
env:
+28 -38
View File
@@ -12,30 +12,31 @@ on:
jobs:
check-packages:
runs-on: archlinux
container:
image: archlinux:latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install prerequisites
run: |
pacman -Syu --noconfirm --needed pacman pacman-contrib curl gnupg
- name: Set up official repos (extra, multilib)
run: |
cat > /etc/pacman.conf <<'EOF'
[options]
Architecture = auto
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
[multilib]
Include = /etc/pacman.d/mirrorlist
EOF
printf '%s\n' \
'[options]' \
'Architecture = auto' \
'SigLevel = Required DatabaseOptional' \
'LocalFileSigLevel = Optional' \
'' \
'[core]' \
'Include = /etc/pacman.d/mirrorlist' \
'' \
'[extra]' \
'Include = /etc/pacman.d/mirrorlist' \
'' \
'[multilib]' \
'Include = /etc/pacman.d/mirrorlist' \
> /etc/pacman.conf
# Generate a basic mirrorlist
curl -fsSL "https://archlinux.org/mirrorlist/all/status/" \
@@ -51,17 +52,13 @@ jobs:
pacman -U --noconfirm /tmp/cachyos-keyring.pkg.tar.zst || true
# Add CachyOS mirrorlist
cat > /etc/pacman.d/cachyos-mirrorlist <<'MIRROR'
Server = https://mirror.cachyos.org/$repo/$arch
MIRROR
printf '%s\n' \
'Server = https://mirror.cachyos.org/$repo/$arch' \
> /etc/pacman.d/cachyos-mirrorlist
# Add CachyOS repo to pacman.conf
cat >> /etc/pacman.conf <<'EOF'
[cachyos]
SigLevel = Optional TrustAll
Include = /etc/pacman.d/cachyos-mirrorlist
EOF
printf '\n[cachyos]\nSigLevel = Optional TrustAll\nInclude = /etc/pacman.d/cachyos-mirrorlist\n' \
>> /etc/pacman.conf
pacman -Syu --noconfirm
@@ -72,23 +69,16 @@ jobs:
pacman-key --lsign-key FBA220DFC880C036 || true
# Add chaotic-aur mirrorlist
cat > /etc/pacman.d/chaotic-mirrorlist <<'MIRROR'
Server = https://chaotic.archlinux.org/$repo/$arch
MIRROR
printf '%s\n' \
'Server = https://chaotic.archlinux.org/$repo/$arch' \
> /etc/pacman.d/chaotic-mirrorlist
# Add chaotic-aur repo to pacman.conf
cat >> /etc/pacman.conf <<'EOF'
[chaotic-aur]
SigLevel = Optional TrustAll
Include = /etc/pacman.d/chaotic-mirrorlist
EOF
printf '\n[chaotic-aur]\nSigLevel = Optional TrustAll\nInclude = /etc/pacman.d/chaotic-mirrorlist\n' \
>> /etc/pacman.conf
pacman -Syu --noconfirm
- name: Checkout repo
uses: actions/checkout@v4
- name: Check all packages
run: |
echo "═══════════════════════════════════════════════════════════════"
+3 -4
View File
@@ -7,16 +7,15 @@ on:
jobs:
syntax-check:
runs-on: ubuntu-latest
runs-on: archlinux
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install linting tools
run: |
sudo apt-get update
sudo apt-get install -y shellcheck
pip install --break-system-packages yamllint
set -e
pacman -Syu --noconfirm --needed shellcheck python-yamllint
- name: Lint shell scripts with ShellCheck
run: |