Skip to content

Commit

Permalink
Deploy to Docker Hub instead. (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
kixelated authored Oct 13, 2023
1 parent b14efa7 commit ae84f0c
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 88 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ insert_final_newline = true
indent_style = tab
indent_size = 4
max_line_length = 120

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_style = space
indent_size = 2
17 changes: 0 additions & 17 deletions .github/workflows/check.yml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: main

on:
push:
branches: ["main"]

env:
REGISTRY: docker.io
IMAGE: ${{ github.repository }}
SERVICE: web

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write

# Only one release at a time and cancel prior releases
concurrency:
group: release
cancel-in-progress: true

steps:
- uses: actions/checkout@v3

# I'm paying for Depot for faster ARM builds.
- uses: depot/setup-action@v1

# Log into the docker registry via the GCP token
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# Build and push Docker image with Depot
- uses: depot/build-push-action@v1
with:
project: hppp3x0qjc
context: .
push: true
tags: ${{env.REGISTRY}}/${{env.IMAGE}}

# Log in to GCP
- uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}

# Deploy to cloud run
- uses: google-github-actions/deploy-cloudrun@v1
with:
service: ${{env.SERVICE}}
image: ${{env.REGISTRY}}/${{env.IMAGE}}
17 changes: 17 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: pr

on:
pull_request:
branches: ["main"]

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3

- run: npm ci
- run: npm run build
- run: npm run lint
71 changes: 0 additions & 71 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit ae84f0c

Please sign in to comment.