chore: Add dockerfile for deployment (#180)

This just adds a very simple dockerfile for deploying `coderd` (and later `provisionerd`). 

This adds a `deploy` directory at the root, and a `make docker/build` command to the makefile.

Thanks @jawnsy for the all the help 😄
This commit is contained in:
Bryan
2022-02-07 15:25:50 -08:00
committed by GitHub
parent 4304d7d831
commit b75ffdcc0b
4 changed files with 90 additions and 10 deletions
+41 -9
View File
@@ -88,14 +88,9 @@ jobs:
- run: "make --output-sync -j gen"
- run: ./scripts/check_unstaged.sh
style:
name: "style/${{ matrix.style }}"
style-fmt:
name: "style/fmt"
runs-on: ubuntu-latest
strategy:
matrix:
style:
- fmt
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
@@ -116,8 +111,8 @@ jobs:
run: yarn install
working-directory: site
- name: "make ${{ matrix.style }}"
run: "make --output-sync -j ${{ matrix.style }}"
- name: "make fmt"
run: "make --output-sync -j fmt"
test-go:
name: "test/go"
@@ -189,6 +184,43 @@ jobs:
flags: unittest-go-${{ matrix.os }}
fail_ci_if_error: true
deploy:
name: "deploy"
runs-on: ubuntu-latest
#if: github.event_name == 'pull_request'
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v2
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v0
with:
workload_identity_provider: projects/477254869654/locations/global/workloadIdentityPools/github/providers/github
service_account: github@coder-ci.iam.gserviceaccount.com
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v0
- name: Configure Docker for Google Artifact Registry
run: gcloud auth configure-docker us-docker.pkg.dev
- uses: actions/setup-node@v2
with:
node-version: "14"
- run: yarn install
working-directory: site
- uses: actions/setup-go@v2
with:
go-version: "^1.17"
- run: make docker/image/coder
- run: docker push us-docker.pkg.dev/coder-blacktriangle-dev/ci/coder:latest
test-js:
name: "test/js"
runs-on: ubuntu-latest