Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/atlas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
- name: Read Go version
id: go_version
run: echo "go_version=$(cat .go-version)" >> $GITHUB_OUTPUT
- name: Install Go (${{ steps.go_version.outputs.go_version }})
uses: actions/setup-go@v4
with:
go-version: 1.19.x
go-version: ${{ steps.go_version.outputs.go_version }}
- name: Check atlas.sum
run: |
go run -mod=mod ariga.io/atlas/cmd/atlas@v0.5.0 \
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
- name: Read Go version
id: go_version
run: echo "go_version=$(cat .go-version)" >> $GITHUB_OUTPUT
- name: Install Go (${{ steps.go_version.outputs.go_version }})
uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version: ${{ steps.go_version.outputs.go_version }}
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/mod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
- name: Read Go version
id: go_version
run: echo "go_version=$(cat .go-version)" >> $GITHUB_OUTPUT
- name: Install Go (${{ steps.go_version.outputs.go_version }})
uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version: ${{ steps.go_version.outputs.go_version }}
- name: Check go.mod
run: |
go mod tidy
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pulumi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
- name: Read Go version
id: go_version
run: echo "go_version=$(cat .go-version)" >> $GITHUB_OUTPUT
- name: Install Go (${{ steps.go_version.outputs.go_version }})
uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version: ${{ steps.go_version.outputs.go_version }}
- name: Download Go dependencies
run: go mod download
working-directory: hack/pulumi
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,17 @@ jobs:
test:
strategy:
fail-fast: false
matrix:
go-version:
- 1.20.x
platform:
- ubuntu-latest
runs-on: ${{ matrix.platform }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
- name: Read Go version
id: go_version
run: echo "go_version=$(cat .go-version)" >> $GITHUB_OUTPUT
- name: Install Go (${{ steps.go_version.outputs.go_version }})
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
go-version: ${{ steps.go_version.outputs.go_version }}
cache: true
- name: Test
run: go test -race -coverprofile=covreport -covermode=atomic -coverpkg=$(./hack/coverpkgs.sh) -v ./...
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.20.5
1.20.7
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# syntax = docker/dockerfile:1.4

ARG TARGET=enduro
ARG GO_VERSION

FROM golang:1.20.5-alpine AS build-go
FROM golang:${GO_VERSION}-alpine AS build-go
WORKDIR /src
ENV CGO_ENABLED=0
COPY --link go.* ./
Expand Down Expand Up @@ -34,7 +35,7 @@ RUN --mount=type=cache,target=/go/pkg/mod \
-o /out/enduro-a3m-worker \
./cmd/enduro-a3m-worker

FROM alpine:3.18.2 AS base
FROM alpine:3.18.3 AS base
ARG USER_ID=1000
ARG GROUP_ID=1000
RUN addgroup -g ${GROUP_ID} -S enduro
Expand Down
3,133 changes: 1 addition & 3,132 deletions go.work.sum

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion hack/build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@ TILT_EXPECTED_REF=${EXPECTED_REF:-}
IMAGE_NAME="${TILT_EXPECTED_REF:-$DEFAULT_IMAGE_NAME}"
BUILD_OPTS="${BUILD_OPTS:-}"

GO_VERSION=$(cat .go-version)
test -n "$GO_VERSION" || { echo "Error: .go-version is empty."; exit 1; }

env DOCKER_BUILDKIT=1 docker build \
-t "$IMAGE_NAME" \
-f "$FOLDER/Dockerfile" \
--build-arg="TARGET=$TARGET" \
--build-arg="GO_VERSION=$GO_VERSION" \
--build-arg="VERSION_PATH=$VERSION_PATH" \
--build-arg="VERSION_LONG=$VERSION_LONG" \
--build-arg="VERSION_SHORT=$VERSION_SHORT" \
--build-arg="VERSION_GIT_HASH=$VERSION_GIT_HASH" \
$BUILD_OPTS \
$FOLDER
$FOLDER