From 7365e7fcd900fcc4ec443de5d1a232478c1c6624 Mon Sep 17 00:00:00 2001 From: Grant Buskey Date: Fri, 17 Nov 2023 14:24:58 -0500 Subject: [PATCH] ci: add build workflow #10 --- .github/workflows/ci.yaml | 49 +++++++++++++++++++++++++++++++++++++++ Dockerfile | 4 ++-- 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..2dd04bb --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,49 @@ +name: CI + +on: + pull_request: + branches: + - main + push: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version: '>=1.21' + - run: make test + + lint: + runs-on: ubuntu-latest + + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version: '>=1.21' + cache: false + env: + GO111MODULE: off + + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.54 + + - run: make megalint + + build-image: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - run: make docker-image \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 457eaec..55898ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,6 @@ RUN make clean && make linux FROM scratch -COPY --from=builder /build/bin/server /usr/local/bin/server +COPY --from=builder /build/bin/epr-server /usr/local/bin/epr-server -CMD /usr/local/bin/server +CMD /usr/local/bin/epr-server