diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 9217124..2bfe1a2 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -7,16 +7,11 @@ on: jobs: lint-test: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 22 - - name: Install deps run: npm ci @@ -28,21 +23,21 @@ jobs: build-push: needs: lint-test - runs-on: ubuntu-latest + runs-on: self-hosted if: github.ref == 'refs/heads/main' steps: - name: Checkout uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + - name: Build image + 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 - uses: docker/build-push-action@v6 - with: - context: . - push: true - tags: localhost:5000/admin/hello-world:${{ github.sha }},localhost:5000/admin/hello-world:latest + - name: Push to registry + run: | + docker push localhost:5000/admin/hello-world:${{ github.sha }} + docker push localhost:5000/admin/hello-world:latest deploy: needs: build-push