try to deploy en nas
This commit is contained in:
+12
-19
@@ -9,13 +9,17 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: linux
|
runs-on: linux
|
||||||
container: node:24
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '24'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
@@ -24,32 +28,21 @@ jobs:
|
|||||||
|
|
||||||
docker:
|
docker:
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: linux
|
runs-on: linux:docker,dind
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Login to Gitea Container Registry
|
- name: Login to Gitea Container Registry
|
||||||
uses: docker/login-action@v3
|
run: |
|
||||||
with:
|
echo "${{ secrets.GITEA_TOKEN }}" | docker login http://192.168.1.39:3000 -u "${{ secrets.GITEA_USERNAME }}" --password-stdin
|
||||||
registry: http://192.168.1.39:3000
|
|
||||||
username: ${{ secrets.GITEA_USERNAME }}
|
|
||||||
password: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
run: |
|
||||||
with:
|
docker build -t 192.168.1.39:3000/username/pc-builder:latest -t 192.168.1.39:3000/username/pc-builder:${{ github.sha }} .
|
||||||
context: .
|
docker push 192.168.1.39:3000/username/pc-builder:latest
|
||||||
push: true
|
docker push 192.168.1.39:3000/username/pc-builder:${{ github.sha }}
|
||||||
tags: |
|
|
||||||
192.168.1.39:3000/username/pc-builder:latest
|
|
||||||
192.168.1.39:3000/username/pc-builder:${{ github.sha }}
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
|
|
||||||
- name: Trigger deploy
|
- name: Trigger deploy
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user