-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update release process: docker build redone, helm chart to release ar…
…tifact, migrate to main branch
- Loading branch information
1 parent
8086249
commit aea5d47
Showing
9 changed files
with
136 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Continuous Integration | ||
on: | ||
workflow_dispatch: null | ||
push: | ||
branches: | ||
- main | ||
pull_request: null | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go-version: [ 'stable', 'oldstable' ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Vet | ||
run: make vet | ||
- name: Lint | ||
run: make lint | ||
- name: Helm Lint | ||
run: make helm-lint | ||
- name: Test | ||
run: make test | ||
- name: Build | ||
run: make build | ||
docker-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Docker Meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
${{ github.event.repository.name }} | ||
tags: | | ||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} | ||
type=semver,pattern={{raw}},value=${{ github.ref_name }} | ||
- name: Build Dockerfile | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: false | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
REV=${{ github.ref_name }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Sync labels | |
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
paths: | ||
- .github/labels.yml | ||
jobs: | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Create Release Artifacts | ||
run: make release | ||
env: | ||
IMAGE_VERSION: ${{ github.ref_name }} | ||
- name: Upload Release Artifacts | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
./release/helm-chart-${{ github.ref_name }}.tgz | ||
- name: Docker Meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
${{ github.event.repository.name }} | ||
tags: | | ||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} | ||
type=semver,pattern={{raw}},value=${{ github.ref_name }} | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Build and Push to Docker Hub | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
# NB: We now cross-compile the go binary locally using the Makefile | ||
FROM alpine:latest | ||
FROM golang:1.20-alpine as builder | ||
RUN mkdir -p /linode | ||
WORKDIR /linode | ||
|
||
COPY go.mod . | ||
COPY go.sum . | ||
COPY main.go . | ||
COPY cloud ./cloud | ||
COPY sentry ./sentry | ||
|
||
RUN go mod download | ||
RUN go build -a -ldflags '-extldflags "-static"' -o /bin/linode-cloud-controller-manager-linux /linode | ||
|
||
FROM alpine:3.18.4 | ||
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* | ||
COPY dist/linode-cloud-controller-manager-linux-amd64 / | ||
ENTRYPOINT ["/linode-cloud-controller-manager-linux-amd64"] | ||
LABEL maintainers="Linode" | ||
LABEL description="Linode Cloud Controller Manager" | ||
COPY --from=builder /bin/linode-cloud-controller-manager-linux /linode-cloud-controller-manager-linux | ||
ENTRYPOINT ["/linode-cloud-controller-manager-linux"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters