install node all 2
Some checks failed
checks / Check & Test (Frontend + Backend) (push) Failing after 2s
Gitea Actions Demo / Explore-Gitea-Actions (pull_request) Successful in 3s
Gitea Actions Demo / Explore-Gitea-Actions-2 (pull_request) Successful in 2s
checks / Check & Test (Frontend + Backend) (pull_request) Failing after 1s

This commit is contained in:
Patrick
2025-10-29 17:07:46 +01:00
parent 5d2ad902fb
commit bb5f184139

View File

@ -1,19 +1,71 @@
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions
on: [push]
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
Explore-Gitea-Actions:
Explore-Gitea-Actions-2:
runs-on: ubuntu-latest
steps:
- run: echo "The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "The workflow is now ready to test your code on the runner."
- name: List files in the repository
- name: Info
run: |
ls ${{ gitea.workspace }}
- run: echo "This job's status is ${{ job.status }}."
echo "Triggered by ${{ gitea.event_name }} event"
echo "Branch: ${{ gitea.ref }}"
echo "Repository: ${{ gitea.repository }}"
- name: Install Node.js, npm, and Yarn (optimized)
run: |
set -e
echo "Preparing Node.js, npm, and Yarn setup..."
if command -v apt >/dev/null 2>&1; then
echo "→ Using apt (Debian/Ubuntu)..."
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq >/dev/null
apt-get install -y -qq curl ca-certificates >/dev/null
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - >/dev/null 2>&1
apt-get install -y -qq nodejs >/dev/null
npm install -g yarn --silent
elif command -v apk >/dev/null 2>&1; then
echo "→ Using apk (Alpine)..."
apk add --no-cache curl nodejs npm >/dev/null
npm install -g yarn --silent
elif command -v dnf >/dev/null 2>&1; then
echo "→ Using dnf (Fedora/RHEL)..."
dnf install -y -q curl ca-certificates nodejs npm >/dev/null
npm install -g yarn --silent
else
echo "No supported package manager found (apt, apk, dnf)."
exit 1
fi
echo "Node.js, npm, and Yarn installed successfully:"
node -v
npm -v
yarn -v
- name: Checkout repository manually
env:
TOKEN: ${{ secrets.ACCESS_TOKEN }}
CLONE_URL: ${{ vars.CLONE_URL }}
run: |
echo "Cloning from $CLONE_URL"
echo "Cloning ALL_REPO_TOKEN $ALL_REPO_TOKEN"
CLONE_URL_WITH_AUTH=$(echo "$CLONE_URL" | sed "s#https://#https://$ALL_REPO_TOKEN@#")
git clone "$CLONE_URL_WITH_AUTH" .
- name: List repo files and dependencies versions
run: |
ls .
- name: Done
run: echo "Workflow finished."