From fc961a7521953cc60b4452e74d37c403dfbdd774 Mon Sep 17 00:00:00 2001 From: Kristoffer-Andre Kalliainen Date: Mon, 21 Jun 2021 13:01:43 +0200 Subject: [PATCH] Create pr.yml --- .github/workflows/pr.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..838135c --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,48 @@ +name: Pull Request + +on: [pull_request] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + env: + DOCKER_CLI_EXPERIMENTAL: "enabled" + steps: + - name: Check out + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Docker Login + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GH_PAT }} + + - name: Set up Go 1.15 + uses: actions/setup-go@v1 + with: + go-version: 1.15 + id: go + + - uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Get dependencies + run: make install + + - name: Test + env: + CI: true + run: make test