name: Dev 'on': push: branches: - develop pull_request: branches: - develop jobs: build-local: runs-on: ubuntu-latest steps: - name: Checkout source uses: actions/checkout@v4 - name: Setup golang uses: actions/setup-go@v5 with: go-version: '^1.21.0' - name: Setup nodejs uses: actions/setup-node@v4 with: node-version: '16' cache: 'npm' cache-dependency-path: web/package-lock.json - name: Install go-task run: | go install github.com/go-task/task/v3/cmd/task@latest - name: Install deps run: | task deps - name: Run build run: task build - name: Check modification run: | git diff --exit-code --stat -- . ':(exclude)web/package.json' ':(exclude)web/package-lock.json' ':(exclude)go.mod' ':(exclude)go.sum' - name: Run tests run: task test - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: semaphore path: bin/semaphore retention-days: 1 migrate-boltdb: runs-on: ubuntu-latest needs: - build-local steps: - name: Download artifacts uses: actions/download-artifact@v4 with: name: semaphore - name: Write config run: | cat > config.json <- --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5 ports: - 3306:3306 steps: - name: Download artifacts uses: actions/download-artifact@v4 with: name: semaphore - name: Write config run: | cat > config.json <- --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5 ports: - 3306:3306 steps: - name: Download artifacts uses: actions/download-artifact@v4 with: name: semaphore - name: Write config run: | cat > config.json <- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 ports: - 5432:5432 steps: - name: Download artifacts uses: actions/download-artifact@v4 with: name: semaphore - name: Write config run: | cat > config.json < config.stdin <- --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5 ports: - 3306:3306 steps: - name: Checkout source uses: actions/checkout@v4 - name: Setup golang uses: actions/setup-go@v5 with: go-version: '^1.21.0' - name: Setup nodejs uses: actions/setup-node@v4 with: node-version: '16' cache: 'npm' cache-dependency-path: web/package-lock.json - name: Install go-task run: | go install github.com/go-task/task/v3/cmd/task@latest - name: Download artifacts uses: actions/download-artifact@v4 with: name: semaphore - name: Write config run: | cat > config.stdin <- --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5 ports: - 3306:3306 steps: - name: Checkout source uses: actions/checkout@v4 - name: Setup golang uses: actions/setup-go@v5 with: go-version: '^1.21.0' - name: Setup nodejs uses: actions/setup-node@v4 with: node-version: '16' cache: 'npm' cache-dependency-path: web/package-lock.json - name: Install go-task run: | go install github.com/go-task/task/v3/cmd/task@latest - name: Download artifacts uses: actions/download-artifact@v4 with: name: semaphore - name: Write config run: | cat > config.stdin <- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 ports: - 5432:5432 steps: - name: Checkout source uses: actions/checkout@v4 - name: Setup golang uses: actions/setup-go@v5 with: go-version: '^1.21.0' - name: Setup nodejs uses: actions/setup-node@v4 with: node-version: '16' cache: 'npm' cache-dependency-path: web/package-lock.json - name: Install go-task run: | go install github.com/go-task/task/v3/cmd/task@latest - name: Download artifacts uses: actions/download-artifact@v4 with: name: semaphore - name: Write config run: | cat > config.stdin < tags: | type=raw,value=develop flavor: | latest=false - name: Server build uses: docker/build-push-action@v5 with: builder: ${{ steps.buildx.outputs.name }} context: . file: deployment/docker/server/Dockerfile platforms: linux/amd64,linux/arm64 #,linux/arm/v6 push: ${{ github.event_name != 'pull_request' }} labels: ${{ steps.server.outputs.labels }} tags: ${{ steps.server.outputs.tags }} - name: Runner meta id: runner uses: docker/metadata-action@v5 with: github-token: ${{ secrets.GITHUB_TOKEN }} images: | semaphoreui/runner labels: | org.opencontainers.image.vendor=SemaphoreUI maintainer=Semaphore UI tags: | type=raw,value=develop flavor: | latest=false - name: Runner build uses: docker/build-push-action@v5 with: builder: ${{ steps.buildx.outputs.name }} context: . file: deployment/docker/runner/Dockerfile platforms: linux/amd64,linux/arm64,linux/arm/v6 push: ${{ github.event_name != 'pull_request' }} labels: ${{ steps.runner.outputs.labels }} tags: ${{ steps.runner.outputs.tags }}