ci: fix workflow stability by using standard actions
This commit is contained in:
@@ -20,9 +20,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
run: |
|
||||
git clone --depth 1 --branch ${{ github.ref_name }} http://gitea:3000/jimmy/nas-tools.git .
|
||||
git checkout ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
|
||||
- name: Resolve image tags
|
||||
run: |
|
||||
|
||||
@@ -15,9 +15,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
run: |
|
||||
git clone --depth 1 --branch ${{ github.ref_name }} http://gitea:3000/jimmy/nas-tools.git .
|
||||
git checkout ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
- name: Warm mirror cache for base images
|
||||
run: |
|
||||
set -u
|
||||
|
||||
@@ -18,13 +18,10 @@ jobs:
|
||||
- /var/packages/ContainerManager/target/usr/bin/docker:/usr/bin/docker
|
||||
- /volume1/docker/nas-dashboard:/nas-dashboard
|
||||
steps:
|
||||
- name: Checkout exact commit
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init .
|
||||
git remote add origin http://gitea:3000/jimmy/nas-tools.git
|
||||
git fetch --depth 1 origin "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Warm mirror cache for base images
|
||||
run: |
|
||||
set -u
|
||||
|
||||
+15
-10
@@ -15,9 +15,14 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
run: |
|
||||
git clone http://gitea:3000/jimmy/nas-tools.git .
|
||||
git checkout ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
cache: 'pip'
|
||||
cache-dependency-path: 'dashboard/backend/requirements*.txt'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@@ -46,14 +51,14 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
run: |
|
||||
git clone http://gitea:3000/jimmy/nas-tools.git .
|
||||
git checkout ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Node.js
|
||||
run: |
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||
apt-get install -y nodejs
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: 'dashboard/frontend/package-lock.json'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user