fix: all jobs on self-hosted (host network) for direct localhost access
CI/CD Pipeline / lint-test (push) Failing after 1s
CI/CD Pipeline / build-push (push) Has been skipped
CI/CD Pipeline / deploy (push) Has been skipped

This commit is contained in:
host-db
2026-06-20 17:49:54 +02:00
parent bca129f2dc
commit 7cdde1d537
+10 -15
View File
@@ -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: 172.17.0.1:5000/admin/hello-world:${{ github.sha }},172.17.0.1:5000/admin/hello-world:latest
deploy: deploy:
needs: build-push needs: build-push