fix: ubuntu-latest jobs with host network, self-hosted for deploy
CI/CD Pipeline / lint-test (push) Failing after 1m7s
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:51:09 +02:00
parent 7cdde1d537
commit f835ef3450
+15 -10
View File
@@ -7,11 +7,16 @@ on:
jobs: jobs:
lint-test: lint-test:
runs-on: self-hosted runs-on: ubuntu-latest
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
@@ -23,21 +28,21 @@ jobs:
build-push: build-push:
needs: lint-test needs: lint-test
runs-on: self-hosted runs-on: ubuntu-latest
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: Build image - name: Set up Docker Buildx
run: | uses: docker/setup-buildx-action@v3
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: Push to registry - name: Build and push
run: | uses: docker/build-push-action@v6
docker push localhost:5000/admin/hello-world:${{ github.sha }} with:
docker push localhost:5000/admin/hello-world:latest context: .
push: true
tags: localhost:5000/admin/hello-world:${{ github.sha }},localhost:5000/admin/hello-world:latest
deploy: deploy:
needs: build-push needs: build-push