From e37e2a22c3c39d2bc1d98c4ac8e6a858e009f45d Mon Sep 17 00:00:00 2001 From: Tobi Okedeji Date: Thu, 28 Dec 2023 16:53:13 +0100 Subject: [PATCH 1/2] fix: add test to build --- .github/workflows/docker.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index afd9314..a15eb09 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -17,9 +17,13 @@ jobs: - name: Prepare Release Variables id: vars uses: ignite/cli/actions/release/vars@main + - name: run recursive test + run: | + set -e + go test -v ./... - name: build run: | GOOS=linux GOARCH=amd64 make echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u "${{ secrets.GHCR_USER }}" --password-stdin docker build . --tag ghcr.io/${{ github.repository }}:${{ steps.vars.outputs.tag_name }} -f docker/Dockerfile --build-arg "ghcr_token=${{ secrets.GHCR_TOKEN }}" - docker push ghcr.io/${{ github.repository }}:${{ steps.vars.outputs.tag_name }} \ No newline at end of file + docker push ghcr.io/${{ github.repository }}:${{ steps.vars.outputs.tag_name }} From 8954d56e759f8815a5617841d37a07d7950de8a7 Mon Sep 17 00:00:00 2001 From: Tobi Okedeji Date: Thu, 28 Dec 2023 16:54:40 +0100 Subject: [PATCH 2/2] add build workflow --- .github/workflows/build.yml | 25 +++++++++++++++++++++++++ .github/workflows/docker.yaml | 4 ---- 2 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..fa21ecb --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: Build Pipeline for Test +'on': + - pull_request +concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v3 + with: + go-version: '^1.21' + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: run recursive test + run: | + set -e + go test -v ./... diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index a15eb09..a0612a6 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -17,10 +17,6 @@ jobs: - name: Prepare Release Variables id: vars uses: ignite/cli/actions/release/vars@main - - name: run recursive test - run: | - set -e - go test -v ./... - name: build run: | GOOS=linux GOARCH=amd64 make