Skip to content

chore(deps): update ghcr.io/coder/code-server docker tag to v4.96.4 #217

chore(deps): update ghcr.io/coder/code-server docker tag to v4.96.4

chore(deps): update ghcr.io/coder/code-server docker tag to v4.96.4 #217

Workflow file for this run

name: πŸš€ Deploy
on:
push:
branches:
- main
- develop
pull_request: {}
permissions:
actions: write
contents: read
jobs:
lint:
name: ⬣ ESLint
runs-on: ubuntu-latest
steps:
# - name: πŸ›‘ Cancel Previous Runs
# uses: styfle/cancel-workflow-action@0.11.0
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: Setup PNPM
uses: pnpm/action-setup@v2.2.4
with:
version: 7
- name: βŽ” Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- name: πŸ“₯ Download deps
run: pnpm install --frozen-lockfile
- name: πŸ”¬ Lint
run: pnpm run lint
typecheck:
name: Κ¦ TypeScript
runs-on: ubuntu-latest
steps:
# - name: πŸ›‘ Cancel Previous Runs
# uses: styfle/cancel-workflow-action@0.11.0
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: Setup PNPM
uses: pnpm/action-setup@v2.2.4
with:
version: 7
- name: βŽ” Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- name: πŸ“₯ Download deps
run: pnpm install --frozen-lockfile
- name: πŸ”Ž Type check
run: pnpm run typecheck
# vitest:
# name: ⚑ Vitest
# runs-on: ubuntu-latest
# steps:
# # - name: πŸ›‘ Cancel Previous Runs
# # uses: styfle/cancel-workflow-action@0.11.0
# - name: ⬇️ Checkout repo
# uses: actions/checkout@v3
# - name: Setup PNPM
# uses: pnpm/action-setup@v2.2.4
# with:
# version: 7
# - name: βŽ” Setup node
# uses: actions/setup-node@v3
# with:
# node-version: 18
# cache: "pnpm"
# - name: πŸ“₯ Download deps
# run: pnpm install --frozen-lockfile
# - name: ⚑ Run vitest
# run: pnpm run vitest -- --coverage
# e2e:
# name: ⚫️ e2e
# runs-on: ubuntu-latest
# steps:
# # - name: πŸ›‘ Cancel Previous Runs
# # uses: styfle/cancel-workflow-action@0.11.0
# - name: ⬇️ Checkout repo
# uses: actions/checkout@v3
# - name: πŸ„ Copy test env vars
# run: cp .env.example .env
# - name: Setup PNPM
# uses: pnpm/action-setup@v2.2.4
# with:
# version: 7
# - name: βŽ” Setup node
# uses: actions/setup-node@v3
# with:
# node-version: 18
# cache: "pnpm"
# - name: πŸ“₯ Download deps
# run: |
# # pnpx cypress install
# pnpm install --frozen-lockfile
# - name: πŸ–₯ Cache cypress binary
# uses: actions/cache@v3
# with:
# path: ~/.cache/Cypress
# key: ${{ runner.os }}-cypress-${{ matrix.browsers }}
# - name: πŸ›  Setup Database
# run: pnpx prisma migrate reset --force
# - name: βš™οΈ Build
# run: pnpm run build
# - name: Install Playwright Browsers
# run: npx playwright install --with-deps
# - name: Run Playwright tests
# run: pnpm dlx playwright test
# - uses: actions/upload-artifact@v3
# if: always()
# with:
# name: playwright-report
# path: playwright-report/
# retention-days: 30
# - name: 🌳 Cypress run
# uses: cypress-io/github-action@v4
# with:
# start: pnpm run start:mocks
# wait-on: "http://localhost:8811"
# browser: ${{ matrix.browsers }}
# record: true
# env:
# PORT: "8811"
# CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - uses: actions/upload-artifact@v3
# if: failure()
# with:
# name: cypress-screenshots-${{ matrix.browsers }}
# path: cypress/screenshots
# - uses: actions/upload-artifact@v3
# if: always()
# with:
# name: cypress-videos
# path: cypress/videos
build:
name: 🐳 Build
# only build/deploy main branch on pushes
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') && github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
# - name: πŸ›‘ Cancel Previous Runs
# uses: styfle/cancel-workflow-action@0.11.0
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: πŸ‘€ Read app name
uses: SebRollen/toml-action@v1.0.2
id: app_name
with:
file: "fly.toml"
field: "app"
- name: 🐳 Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Setup cache
- name: ⚑️ Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: πŸ”‘ Fly Registry Auth
uses: docker/login-action@v2
with:
registry: registry.fly.io
username: x
password: ${{ secrets.FLY_API_TOKEN }}
- name: πŸ”‘ Docker Registry Auth
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 🐳 Docker build
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
registry.fly.io/${{ steps.app_name.outputs.value }}:${{ github.ref_name }}-${{ github.sha }}
stiforr/${{ steps.app_name.outputs.value }}:${{ github.ref_name }}-${{ github.sha }}
build-args: |
COMMIT_SHA=${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
# This ugly bit is necessary if you don't want your cache to grow forever
# till it hits GitHub's limit of 5GB.
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: 🚚 Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
sentry-release:
name: πŸ“¦ Sentry Release
runs-on: ubuntu-latest
needs: [lint, typecheck, build]
# only build/deploy main branch on pushes
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') && github.event_name == 'push' }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: Setup PNPM
uses: pnpm/action-setup@v2.2.4
with:
version: 7
- name: βŽ” Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- name: πŸ“₯ Download deps
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
- name: πŸ“¦ Create Sentry Release
uses: getsentry/action-release@v1
with:
environment: ${{ github.ref_name }}
version: ${{ github.sha }}
sourcemaps: "./build ./public/build"
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
- name: Remove sourcemaps
run: |
find ./public/build -type f -name '*.map' -delete
find ./build -type f -name '*.map' -delete
deploy:
name: πŸš€ Deploy
runs-on: ubuntu-latest
needs: [lint, typecheck, build]
# only build/deploy main branch on pushes
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') && github.event_name == 'push' }}
steps:
# - name: πŸ›‘ Cancel Previous Runs
# uses: styfle/cancel-workflow-action@0.11.0
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: πŸ‘€ Read app name
uses: SebRollen/toml-action@v1.0.2
id: app_name
with:
file: "fly.toml"
field: "app"
- name: πŸš€ Deploy Staging
if: ${{ github.ref == 'refs/heads/develop' }}
uses: superfly/flyctl-actions@v1.4
with:
args: "deploy --app ${{ steps.app_name.outputs.value }} --remote-only"
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
- name: πŸš€ Deploy Production
if: ${{ github.ref == 'refs/heads/main' }}
uses: superfly/flyctl-actions@v1.4
with:
args: "deploy --app ${{ steps.app_name.outputs.value }} --remote-only"
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}