Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Archive update

Archive update #112

Workflow file for this run

name: Build and push Docker image
on:
push:
branches:
- main
pull_request:
branches:
jobs:
build:
name: Lint, build and test
runs-on: ubuntu-22.04
if: false
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "10"
- name: Lint TypeScript
run: |
cd webapp
npm ci
npx ng lint
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.17"
- name: Lint Go
run: |
cd backend
if test $( gofmt -d . | tee gofmt.results | wc -l ) -ne 0; then cat gofmt.results; exit 1; fi
go get -u golang.org/x/lint/golint
golint -set_exit_status ./...
- name: Setup protobuf C compiler
uses: arduino/setup-protoc@v1
with:
version: "3.19"
- name: Build
run: make backend-build webapp-build
- name: Test
run: make backend-test
deploy-to-dockerhub:
name: Build and push Docker images
needs: build
if: github.event_name == 'push'
runs-on: ubuntu-18.04
steps:
- uses: docker/setup-buildx-action@v2
- uses: actions/setup-go@v2
with:
go-version: "1.17"
- uses: actions/setup-node@v2
with:
node-version: "10"
- uses: arduino/setup-protoc@v1
with:
version: "3.19"
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: actions/checkout@v3
- run: make configs webapp-proto
# - uses: docker/build-push-action@v4
# with:
# context: backend
# push: true
# tags: c4dt/service-stainless-backend:latest
- uses: docker/build-push-action@v4
with:
context: webapp
push: true
tags: c4dt/service-stainless-backend:latest