fix: all jobs self-hosted (host network, direct localhost access)
This commit is contained in:
+10
-15
@@ -7,16 +7,11 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-test:
|
lint-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
|
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
@@ -28,21 +23,21 @@ jobs:
|
|||||||
|
|
||||||
build-push:
|
build-push:
|
||||||
needs: lint-test
|
needs: lint-test
|
||||||
runs-on: ubuntu-latest
|
runs-on: self-hosted
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Build image
|
||||||
uses: docker/setup-buildx-action@v3
|
run: |
|
||||||
|
docker build -t localhost:5000/admin/hello-world:${{ github.sha }} .
|
||||||
|
docker tag localhost:5000/admin/hello-world:${{ github.sha }} localhost:5000/admin/hello-world:latest
|
||||||
|
|
||||||
- name: Build and push
|
- name: Push to registry
|
||||||
uses: docker/build-push-action@v6
|
run: |
|
||||||
with:
|
docker push localhost:5000/admin/hello-world:${{ github.sha }}
|
||||||
context: .
|
docker push localhost:5000/admin/hello-world:latest
|
||||||
push: true
|
|
||||||
tags: localhost:5000/admin/hello-world:${{ github.sha }},localhost:5000/admin/hello-world:latest
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
needs: build-push
|
needs: build-push
|
||||||
|
|||||||
Reference in New Issue
Block a user