Use composer:2 container in Gitea workflows
Tests / tests (push) Failing after 13s
Release / upload-asset (push) Failing after 1s

This commit is contained in:
sandros committed 2026-09-26 23:10:38 +02:00
1 parent d035dbe215
commit 2bdb8c67da
2 files changed
+5 -17

No files matched your search

+4 -10
View File
@@ -14,15 +14,9 @@ jobs:
upload-asset:
runs-on: ubuntu-latest
container:
image: php:7.4-cli
image: composer:2
steps:
- name: Install system dependencies
run: |
apt-get update -qq
apt-get install -y -qq git unzip zip curl jq
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- uses: actions/checkout@v3
- name: Build release zip
@@ -52,16 +46,16 @@ jobs:
echo "Target API: $API_URL/repos/$REPO"
RELEASE_JSON=$(curl -s -H "Authorization: token $GITEA_TOKEN" "$API_URL/repos/$REPO/releases/tags/$TAG")
RELEASE_ID=$(echo "$RELEASE_JSON" | jq -r .id)
RELEASE_ID=$(echo "$RELEASE_JSON" | php -r '$d = json_decode(file_get_contents("php://stdin")); echo $d->id ?? "";')
if [ "$RELEASE_ID" = "null" ] || [ -z "$RELEASE_ID" ]; then
if [ -z "$RELEASE_ID" ]; then
echo "Creating release for tag $TAG..."
CREATE_RES=$(curl -s -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\",\"body\":\"Release $TAG\"}" \
"$API_URL/repos/$REPO/releases")
RELEASE_ID=$(echo "$CREATE_RES" | jq -r .id)
RELEASE_ID=$(echo "$CREATE_RES" | php -r '$d = json_decode(file_get_contents("php://stdin")); echo $d->id ?? "";')
fi
echo "Uploading laps.zip to release ID $RELEASE_ID..."
+1 -7
View File
@@ -10,15 +10,9 @@ jobs:
tests:
runs-on: ubuntu-latest
container:
image: php:7.4-cli
image: composer:2
steps:
- name: Install system dependencies
run: |
apt-get update -qq
apt-get install -y -qq git unzip curl
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- uses: actions/checkout@v3
- name: Install Composer dependencies