From 9f4aea72466ece4c7c5d41b8ca8302f81ca83062 Mon Sep 17 00:00:00 2001 From: muXxer Date: Fri, 16 Feb 2024 16:18:30 +0100 Subject: [PATCH] Fix workflows --- .github/workflows/build.yml | 35 +++++++++++++++++++++++++++++++++++ .github/workflows/gendoc.yml | 10 +++++----- .github/workflows/go.yml | 28 ---------------------------- 3 files changed, 40 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..00a693e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +name: Build + +on: + pull_request + +jobs: + build: + name: Go + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + cache: false + id: go + + - name: Print Go version + run: go version + + - name: Build + run: go build -v . + + build_docker: + name: Docker + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + + - name: Build Docker image + run: docker build . --file Dockerfile --tag inx-faucet:latest diff --git a/.github/workflows/gendoc.yml b/.github/workflows/gendoc.yml index 3311afd..e88f5da 100644 --- a/.github/workflows/gendoc.yml +++ b/.github/workflows/gendoc.yml @@ -9,6 +9,11 @@ jobs: gendoc: runs-on: ubuntu-latest steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + with: + submodules: 'true' + - name: Set up Go uses: actions/setup-go@v5 with: @@ -19,11 +24,6 @@ jobs: - name: Print Go version run: go version - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - with: - submodules: 'true' - - name: Run gendoc working-directory: tools/gendoc run: go mod tidy && go run main.go diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index 744e60c..0000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Go - -on: - push: - branches: [ develop ] - pull_request: - branches: [ develop ] - -jobs: - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: 'true' - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: 'go.mod' - cache: false - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v ./...