diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml deleted file mode 100644 index 0f3971b..0000000 --- a/.gitea/workflows/build.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Build and Push Docker Image - -on: - push: - branches: [main] - -jobs: - test: - runs-on: ubuntu-latest - - container: - options: --cap-add=NET_ADMIN --device=/dev/net/tun - - steps: - - name: Tailscale - uses: tailscale/github-action@v4 - with: - authkey: ${{ secrets.TAILSCALE_AUTHKEY }} - ping: rose-library,gitea - version: latest - use-cache: 'false' - - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version-file: .nvmrc - - - name: Install - run: npm ci - - - name: Check formatting - run: npm run format:check - - - name: Validate argument map - run: npm test - - build: - runs-on: ubuntu-latest - needs: test - - container: - options: --cap-add=NET_ADMIN --device=/dev/net/tun - - steps: - - name: Tailscale - uses: tailscale/github-action@v4 - with: - authkey: ${{ secrets.TAILSCALE_AUTHKEY }} - ping: rose-library,gitea - version: latest - use-cache: 'false' - - - name: Checkout - uses: actions/checkout@v4 - - - name: Docker Login - uses: docker/login-action@v2 - with: - registry: gitea.allosaurus-chromatic.ts.net - username: ${{ secrets.REGISTRY_USER }} - password: ${{ secrets.REGISTRY_PASSWORD }} - - - name: Docker Build - run: | - docker build -t gitea.allosaurus-chromatic.ts.net/tlecommunity/v2-api:latest . --provenance=false --platform=linux/amd64 - - - name: Docker Push - run: | - docker push gitea.allosaurus-chromatic.ts.net/tlecommunity/v2-api:latest diff --git a/.tangled/workflows/build.yml b/.tangled/workflows/build.yml new file mode 100644 index 0000000..c27dada --- /dev/null +++ b/.tangled/workflows/build.yml @@ -0,0 +1,37 @@ +name: Build and Push Docker Image + +when: + - event: ['push'] + branch: ['main'] + +engine: 'nixery' + +dependencies: + nixpkgs: + - nodejs + +cache: + - key: node_modules + hash: + - package.json + - package-lock.json + paths: + - node_modules + +steps: + - name: Install + command: npm ci + + - name: Test + command: | + npm run format:check + npm test + + - name: Docker Login + command: echo 'TODO' + + - name: Docker Build + command: echo 'TODO' + + - name: Docker Push + command: echo 'TODO'