because I got bored of customising my CV for every job
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ci(CVG-29): add GitHub Actions for release, image build, and client deploy

+157
+63
.github/workflows/create-release.yml
··· 1 + name: Create release 2 + 3 + on: 4 + workflow_dispatch: 5 + inputs: 6 + bump: 7 + description: "Version bump type" 8 + required: true 9 + type: choice 10 + options: 11 + - patch 12 + - minor 13 + - major 14 + 15 + permissions: 16 + contents: write 17 + 18 + jobs: 19 + release: 20 + name: Create tag and release 21 + runs-on: ubuntu-latest 22 + steps: 23 + - uses: actions/create-github-app-token@v1 24 + id: app-token 25 + with: 26 + app-id: ${{ vars.RIOTBYTE_BOT_APP_ID }} 27 + private-key: ${{ secrets.RIOTBYTE_BOT_PRIVATE_KEY }} 28 + 29 + - uses: actions/checkout@v4 30 + with: 31 + fetch-depth: 0 32 + 33 + - name: Determine next version 34 + id: version 35 + run: | 36 + LATEST=$(git tag --list --sort=-v:refname '[0-9]*.[0-9]*.[0-9]*' --merged HEAD | head -n1) 37 + 38 + if [ -z "$LATEST" ]; then 39 + LATEST="0.0.0" 40 + fi 41 + 42 + IFS='.' read -r MAJOR MINOR PATCH <<< "$LATEST" 43 + 44 + case "${{ inputs.bump }}" in 45 + major) MAJOR=$((MAJOR + 1)); MINOR=0; PATCH=0 ;; 46 + minor) MINOR=$((MINOR + 1)); PATCH=0 ;; 47 + patch) PATCH=$((PATCH + 1)) ;; 48 + esac 49 + 50 + NEXT="${MAJOR}.${MINOR}.${PATCH}" 51 + echo "previous=${LATEST}" >> "$GITHUB_OUTPUT" 52 + echo "next=${NEXT}" >> "$GITHUB_OUTPUT" 53 + echo "Bumping ${LATEST} → ${NEXT} (${{ inputs.bump }})" 54 + 55 + - name: Create tag and GitHub release 56 + env: 57 + GH_TOKEN: ${{ steps.app-token.outputs.token }} 58 + run: | 59 + gh release create "${{ steps.version.outputs.next }}" \ 60 + --target "${{ github.sha }}" \ 61 + --title "${{ steps.version.outputs.next }}" \ 62 + --generate-notes \ 63 + --notes-start-tag "${{ steps.version.outputs.previous }}"
+40
.github/workflows/deploy-client.yml
··· 1 + name: Deploy client to Cloudflare Pages 2 + 3 + on: 4 + push: 5 + tags: 6 + - "*.*.*" 7 + 8 + jobs: 9 + deploy: 10 + name: Build and deploy SPA 11 + runs-on: ubuntu-latest 12 + permissions: 13 + contents: read 14 + 15 + steps: 16 + - uses: actions/checkout@v4 17 + 18 + - uses: pnpm/action-setup@v4 19 + with: 20 + version: latest 21 + 22 + - uses: actions/setup-node@v4 23 + with: 24 + node-version: 24 25 + cache: pnpm 26 + 27 + - name: Install dependencies 28 + run: pnpm install --frozen-lockfile 29 + 30 + - name: Build client 31 + env: 32 + VITE_SERVER_URL: https://cv-generator-api.riotbyte.com 33 + run: pnpm --filter @cv/client build 34 + 35 + - name: Deploy to Cloudflare Pages 36 + uses: cloudflare/wrangler-action@v3 37 + with: 38 + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} 39 + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} 40 + command: pages deploy apps/client/dist --project-name=cv-generator
+54
.github/workflows/release.yml
··· 1 + name: Build and publish Docker images 2 + 3 + on: 4 + push: 5 + tags: 6 + - "*.*.*" 7 + 8 + env: 9 + REGISTRY: ghcr.io 10 + IMAGE_BASE: ghcr.io/riotbyte-com/cv-generator 11 + 12 + jobs: 13 + build-and-push: 14 + runs-on: ubuntu-latest 15 + permissions: 16 + contents: read 17 + packages: write 18 + 19 + strategy: 20 + matrix: 21 + include: 22 + - name: server 23 + dockerfile: .docker/server.Dockerfile 24 + - name: worker 25 + dockerfile: .docker/worker.Dockerfile 26 + 27 + steps: 28 + - uses: actions/checkout@v4 29 + 30 + - uses: docker/login-action@v3 31 + with: 32 + registry: ${{ env.REGISTRY }} 33 + username: ${{ github.actor }} 34 + password: ${{ secrets.GITHUB_TOKEN }} 35 + 36 + - uses: docker/metadata-action@v5 37 + id: meta 38 + with: 39 + images: ${{ env.IMAGE_BASE }}-${{ matrix.name }} 40 + tags: | 41 + type=semver,pattern={{version}} 42 + type=semver,pattern={{major}}.{{minor}} 43 + type=ref,event=tag 44 + 45 + - uses: docker/build-push-action@v6 46 + with: 47 + context: . 48 + file: ${{ matrix.dockerfile }} 49 + target: production 50 + push: true 51 + tags: ${{ steps.meta.outputs.tags }} 52 + labels: ${{ steps.meta.outputs.labels }} 53 + build-args: | 54 + GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}