Minor fixes and improvements #516
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: snapshot-pipeline | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - '*' | |
| jobs: | |
| quality-checks: | |
| runs-on: self-hosted | |
| services: | |
| postgres: | |
| image: postgres:18-alpine | |
| env: | |
| POSTGRES_DB: nginx_ignition_tests | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 44554:5432 | |
| env: | |
| GOPATH: /data/cache/go | |
| GOMODCACHE: /data/cache/go/pkg/mod | |
| GOTOOLCHAIN: "" | |
| PNPM_HOME: /data/cache/pnpm | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.26 | |
| - name: Unit tests | |
| env: | |
| TEST_POSTGRES_HOST: runner.local | |
| TEST_POSTGRES_PORT: 44554 | |
| run: make test | |
| - name: Lint | |
| run: make lint | |
| - name: Sonarqube | |
| uses: SonarSource/sonarqube-scan-action@v6 | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| build: | |
| runs-on: self-hosted | |
| env: | |
| GOPATH: /data/cache/go | |
| GOMODCACHE: /data/cache/go/pkg/mod | |
| PNPM_HOME: /data/cache/pnpm | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.26 | |
| - name: Install nfpm | |
| run: | | |
| echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list | |
| sudo apt update | |
| sudo apt install -y nfpm gettext-base | |
| - uses: docker/setup-qemu-action@v3 | |
| - uses: docker/setup-buildx-action@v3 | |
| with: | |
| driver: docker-container | |
| driver-opts: | | |
| image=moby/buildkit:master | |
| network=host | |
| platforms: linux/amd64,linux/arm64 | |
| - uses: docker/login-action@v3 | |
| with: | |
| username: ${{ vars.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and release | |
| run: make build-snapshot PR_ID=${{ github.event.pull_request.number }} |