From 46caa05d2086b09190cc3545e6caf23e30f7c509 Mon Sep 17 00:00:00 2001 From: Rick Rackow Date: Mon, 28 Sep 2020 22:56:26 +0200 Subject: [PATCH] Add initial GitHub actions Update .github/workflows/build_run.yml Co-authored-by: David Stotijn Update .github/workflows/go.yml Co-authored-by: David Stotijn Update .github/workflows/build_run.yml Co-authored-by: David Stotijn Update .github/workflows/go.yml Co-authored-by: David Stotijn Update .github/workflows/go.yml Co-authored-by: David Stotijn Co-authored-by: David Stotijn --- .github/workflows/build_run.yml | 31 +++++++++++++++++++++++++++++++ .github/workflows/dockerimage.yml | 14 ++++++++++++++ .github/workflows/go.yml | 24 ++++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 .github/workflows/build_run.yml create mode 100644 .github/workflows/dockerimage.yml create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/build_run.yml b/.github/workflows/build_run.yml new file mode 100644 index 0000000..ded2de9 --- /dev/null +++ b/.github/workflows/build_run.yml @@ -0,0 +1,31 @@ +name: Build Frontend, Backend and Run + +on: [pull_request] + +jobs: + build: + name: Build Images and Deploy Example WebApp + runs-on: ubuntu-20.04 + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: true + + - name: Test Yarn + uses: + node_version: '14.x' + run: |- + cd admin && \ + yarn install && \ + yarn export + + - name: Test make + run: |- + cd .. && \ + make build + + - name: Run + run: |- + ./hetty diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml new file mode 100644 index 0000000..2d9608f --- /dev/null +++ b/.github/workflows/dockerimage.yml @@ -0,0 +1,14 @@ +name: Docker Image CI + +on: [pull_request] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag hetty:$(date +%s) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..58403c4 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,24 @@ +name: Go +on: [pull_request] +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.15 + uses: actions/setup-go@v1 + with: + go-version: 1.15 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Get dependencies + run: | + go get -v -t -d ./... + + - name: Build + run: go build -v ./cmd/hetty