Release #38
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: Release | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: superfly/flyctl-actions/setup-flyctl@master | |
| # Build Docker image locally in GitHub Actions (more memory than Fly.io builder) | |
| # then deploy the pre-built image to Fly.io | |
| - name: Build Docker image | |
| run: | | |
| docker build \ | |
| --build-arg NODE_VERSION="$(cat .node-version)" \ | |
| --build-arg NEXT_PUBLIC_SENTRY_DSN="${NEXT_PUBLIC_SENTRY_DSN}" \ | |
| --build-arg SENTRY_AUTH_TOKEN="${SENTRY_AUTH_TOKEN}" \ | |
| -t registry.fly.io/jqplay-next:${{ github.sha }} \ | |
| . | |
| env: | |
| NEXT_PUBLIC_SENTRY_DSN: ${{ secrets.NEXT_PUBLIC_SENTRY_DSN }} | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| - name: Push image to Fly.io registry | |
| run: | | |
| flyctl auth docker | |
| docker push registry.fly.io/jqplay-next:${{ github.sha }} | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
| - name: Deploy to Fly.io | |
| run: flyctl deploy --image registry.fly.io/jqplay-next:${{ github.sha }} | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |