diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 61eec556..79ccd05c 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -10,22 +10,18 @@ jobs: name: Check runs-on: ubuntu-latest steps: - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: '1.20' - - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.ref }} - + - name: Install Go + uses: actions/setup-go@v3 + with: + go-version: '1.20' - name: Build run: go build - - name: Test run: go test -race --coverprofile=coverage.txt --covermode=atomic ./... - - name: Upload coverage to Codecov if: success() && github.ref == 'refs/heads/main' uses: codecov/codecov-action@v1 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 567caaaf..caa6ea7d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,24 +10,26 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v2 - + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v4 with: images: ghcr.io/abahmed/kwatch - - name: Build and push Docker image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: + platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7 context: . push: true tags: ${{ steps.meta.outputs.tags }} diff --git a/Dockerfile b/Dockerfile index 5423ac51..e4c9b556 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM golang:alpine AS builder ARG RELEASE_VERSION="nothing" -LABEL maintainer="Abdelrahman Ahmed