Add contest detail page. Start of entry details. #64
Workflow file for this run
This file contains 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: deploy | |
on: | |
push: | |
pull_request: | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
permissions: write-all | |
jobs: | |
lint-ts: | |
runs-on: ubuntu-20.04 | |
env: | |
GBANS_GENERAL_STEAM_KEY: ${{ secrets.GBANS_GENERAL_STEAM_KEY }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install modules | |
working-directory: ./frontend | |
run: yarn | |
- name: Prettier | |
working-directory: ./frontend | |
run: yarn run prettier:check | |
- name: ESLint | |
working-directory: ./frontend | |
run: yarn run eslint:check | |
lint-golangci: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: 'latest' | |
args: --timeout=10m | |
staticcheck: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
- run: go install honnef.co/go/tools/cmd/staticcheck@latest | |
- run: make static | |
lint-codeql: | |
name: Analyze | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ 'go', 'javascript' ] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v2 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
docker-test: | |
needs: [lint-ts, lint-golangci, lint-codeql, staticcheck] | |
runs-on: ubuntu-20.04 | |
env: | |
GBANS_GENERAL_STEAM_KEY: ${{ secrets.GBANS_GENERAL_STEAM_KEY }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build the docker-compose stack | |
run: make docker_test | |
release: | |
name: "gbans release" | |
runs-on: "ubuntu-latest" | |
needs: [docker-test] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --force --tags | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
- run: go mod tidy | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Import GPG key | |
id: import_gpg | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.PASSPHRASE }} | |
- uses: goreleaser/goreleaser-action@v5 | |
if: success() && startsWith(github.ref, 'refs/tags/v') | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }} | |
DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }} | |
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} | |
- name: Build & publish image | |
run: | | |
docker build . --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${GITHUB_REF##*/} | |
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${GITHUB_REF##*/} | |
- name: Upload snapshot | |
if: success() && ${{ startsWith(github.ref, 'refs/tags/v') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: snapshot | |
path: build/* | |
retention-days: 1 | |