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