fix(nginx): remove {CRYPT} prefix from htpasswd format #37
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build & Release | |
| on: | |
| push: | |
| branches: [master, main] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [master, main] | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| - name: Create frontend placeholder | |
| run: | | |
| mkdir -p cmd/server/frontend | |
| echo '<html></html>' > cmd/server/frontend/index.html | |
| - name: Run Go tests | |
| run: go test -race ./internal/... | |
| build: | |
| name: Build | |
| needs: test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - goos: linux | |
| goarch: amd64 | |
| - goos: linux | |
| goarch: arm64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: web/package-lock.json | |
| - name: Build frontend | |
| run: | | |
| cd web && npm ci && npm run build | |
| rm -rf ../cmd/server/frontend | |
| cp -r dist ../cmd/server/frontend | |
| - name: Build binary | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| run: | | |
| VERSION="${GITHUB_REF_NAME:-$(git rev-parse --short HEAD)}" | |
| go build -ldflags "-s -w -X main.version=${VERSION}" \ | |
| -o bin/system-control-${{ matrix.goos }}-${{ matrix.goarch }} \ | |
| ./cmd/server | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: system-control-${{ matrix.goos }}-${{ matrix.goarch }} | |
| path: bin/system-control-${{ matrix.goos }}-${{ matrix.goarch }} | |
| release: | |
| name: Release | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Prepare release files | |
| run: | | |
| mkdir -p release | |
| find artifacts -type f -exec cp {} release/ \; | |
| chmod +x release/* | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: release/* | |
| generate_release_notes: true |