Merge pull request #8 from PaulNetze/docs-cleanup #7
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
| # This workflow will build a golang project | |
| # For more information see: | |
| # https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
| # https://docs.docker.com/build/ci/github-actions/ | |
| name: Build and Deploy | |
| permissions: | |
| contents: read | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "docs/**" | |
| - "licenses/**" | |
| - "*.md" | |
| - ".gitignore" | |
| - ".gitattributes" | |
| - ".gitattributes" | |
| - "LICENSE" | |
| - "NOTICE" | |
| jobs: | |
| test_and_build_go: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Skip Tests | |
| run: | | |
| echo "⚠️ Skipping all tests - no credentials available" | |
| echo "Building binaries only..." | |
| - name: Build Go application | |
| run: go build -v -ldflags="-X 'github.com/engswee/flashpipe/internal/analytics.Host=$ANALYTICS_HOST' -X 'github.com/engswee/flashpipe/internal/analytics.SiteId=1' -X 'github.com/engswee/flashpipe/internal/analytics.ShowLogs=false'" -o output/ ./... | |
| env: | |
| CGO_ENABLED: 0 | |
| ANALYTICS_HOST: ${{ secrets.ANALYTICS_HOST }} | |
| - name: Save output for Docker build | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: | | |
| build/* | |
| output/* | |
| key: ${{ github.sha }} | |
| # ---------------------------------------------------------------- | |
| # Public image for production release | |
| # ---------------------------------------------------------------- | |
| # Docker build disabled - no Docker Hub credentials available | |
| # Uncomment this job when you want to build and push Docker images | |
| # | |
| # build_docker: | |
| # needs: test_and_build_go | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Restore output for Docker build | |
| # uses: actions/cache/restore@v4 | |
| # with: | |
| # path: | | |
| # build/* | |
| # output/* | |
| # key: ${{ github.sha }} | |
| # | |
| # - name: Login to Docker Hub | |
| # uses: docker/login-action@v3 | |
| # with: | |
| # username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| # password: ${{ secrets.DOCKER_PASSWORD }} | |
| # | |
| # - name: Build and push Docker image | |
| # uses: docker/build-push-action@v5 | |
| # with: | |
| # context: . | |
| # file: ./build/Dockerfile | |
| # push: true | |
| # tags: | | |
| # engswee/flashpipe:3.7.0 | |
| # engswee/flashpipe:latest |