Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci|go): bump deps #19

Merged
merged 3 commits into from
Nov 9, 2024
Merged
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "^1.22.0"
go-version: "^1.23"
cache: true

- name: Setup Go Cache PATH
Expand All @@ -36,13 +36,13 @@ jobs:
echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT

- name: Go Build Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}

- name: Go Mod Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/pr-docs-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,30 @@ jobs:
echo "${{ github.head_ref }}" > branch_name

- name: Upload PR artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: pr-num
path: ./pr_num
overwrite: true

- name: Upload PR artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: branch-name
path: ./branch_name
overwrite: true

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Node.js 20.x
uses: actions/setup-node@v3
- name: Install Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x

- uses: pnpm/action-setup@v3
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
Expand Down Expand Up @@ -92,3 +94,4 @@ jobs:
with:
name: docs-${{ matrix.os }}-build
path: docs/.vitepress/dist
overwrite: true
16 changes: 8 additions & 8 deletions .github/workflows/pr-docs-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download artifact - PR
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@v6
with:
workflow_conclusion: success
run_id: ${{ github.event.workflow_run.id }}
Expand All @@ -30,7 +30,7 @@ jobs:
allow_forks: true

- name: Download artifact - PR
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@v6
with:
workflow_conclusion: success
run_id: ${{ github.event.workflow_run.id }}
Expand All @@ -49,7 +49,7 @@ jobs:
echo "BRANCH_NAME=$(cat branch-name/branch_name)" >> $GITHUB_ENV

- name: Download artifact - Ubuntu
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@v6
with:
workflow_conclusion: success
run_id: ${{ github.event.workflow_run.id }}
Expand All @@ -72,15 +72,15 @@ jobs:
wranglerVersion: '3'

- name: Find Comment
uses: peter-evans/find-comment@v2
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ env.PR_NUM }}
comment-author: 'github-actions[bot]'
body-includes: to Cloudflare Pages

- name: Create or update comment
uses: peter-evans/create-or-update-comment@v3
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ env.PR_NUM }}
Expand All @@ -101,7 +101,7 @@ jobs:
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- name: Download artifact - PR
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@v6
with:
workflow_conclusion: success
run_id: ${{ github.event.workflow_run.id }}
Expand All @@ -115,15 +115,15 @@ jobs:
echo "PR_NUM=$(cat pr-num/pr_num)" >> $GITHUB_ENV

- name: Find Comment
uses: peter-evans/find-comment@v2
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ env.PR_NUM }}
comment-author: 'github-actions[bot]'
body-includes: to Cloudflare Pages

- name: Create or update comment
uses: peter-evans/create-or-update-comment@v3
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ env.PR_NUM }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/production-docs-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ env:
jobs:
build:
name: Build
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
environment:
name: Production Docs
url: https://ollama-operator.ayaka.io
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Node.js 20.x
uses: actions/setup-node@v3
- name: Install Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x

- uses: pnpm/action-setup@v3
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
Expand Down
55 changes: 7 additions & 48 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,6 @@ on:
workflow_dispatch:

jobs:
# hub_build:
# name: Build for Docker Hub
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3

# - name: Fetch version
# id: version
# run: |
# export LAST_TAGGED_COMMIT=$(git rev-list --tags --max-count=1)
# export LAST_TAG=$(git describe --tags $LAST_TAGGED_COMMIT)
# echo "version=${LAST_TAG#v}" >> $GITHUB_OUTPUT

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
# with:
# platforms: linux/amd64,linux/arm64

# - name: Sign in to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ github.repository_owner }}
# password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

# - name: Create image tags
# id: dockerinfo
# run: |
# echo "taglatest=${{ github.repository_owner }}/insights-bot:latest" >> $GITHUB_OUTPUT
# echo "tag=${{ github.repository_owner }}/insights-bot:${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT

# - name: Build and Push
# uses: docker/build-push-action@v4
# with:
# context: ./
# file: ./Dockerfile
# push: true
# no-cache: false
# tags: |
# ${{ steps.dockerinfo.outputs.taglatest }}
# ${{ steps.dockerinfo.outputs.tag }}

goreleaser:
name: kollama - Build for GitHub Releases
permissions:
Expand All @@ -56,11 +15,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22
go-version: '1.23'
cache: true

# Get values for cache paths to be used in later steps
Expand All @@ -72,14 +31,14 @@ jobs:

# Cache go build cache, used to speedup go test
- name: Go Build Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}

# Cache go mod cache, used to speedup builds
- name: Go Mod Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
Expand All @@ -101,7 +60,7 @@ jobs:
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Fetch version
id: version
Expand All @@ -121,7 +80,7 @@ jobs:
platforms: linux/amd64,linux/arm64

- name: Sign in to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -134,7 +93,7 @@ jobs:
echo "tag=ghcr.io/${{ github.repository }}:${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT

- name: Build and Push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
context: ./
Expand Down
38 changes: 3 additions & 35 deletions .github/workflows/unstable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,13 @@ on:
workflow_dispatch:

jobs:
# hub_build:
# name: Build for Docker Hub
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
# with:
# platforms: linux/amd64,linux/arm64

# - name: Sign in to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ github.repository_owner }}
# password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

# - name: Create image tags
# id: dockerinfo
# run: |
# echo "tagunstable=${{ github.repository_owner }}/insights-bot:unstable" >> $GITHUB_OUTPUT

# - name: Build and Push
# uses: docker/build-push-action@v4
# with:
# context: ./
# file: ./Dockerfile
# push: true
# no-cache: false
# tags: |
# ${{ steps.dockerinfo.outputs.tagunstable }}

ghcr_build:
name: Build for GitHub Container Registry
permissions:
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- # Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
Expand All @@ -55,7 +23,7 @@ jobs:
platforms: linux/amd64,linux/arm64

- name: Sign in to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -67,7 +35,7 @@ jobs:
echo "tagunstable=ghcr.io/${{ github.repository }}:unstable" >> $GITHUB_OUTPUT

- name: Build and Push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
context: ./
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.22.5 AS builder
FROM golang:1.23 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Image URL to use all building/pushing image targets
IMG ?= controller:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.29.0
ENVTEST_K8S_VERSION = 1.31.0

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -129,7 +129,7 @@ endif

.PHONY: install
install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build config/crd | $(KUBECTL) apply -f -
$(KUSTOMIZE) build config/crd | $(KUBECTL) apply --server-side=true -f -

.PHONY: uninstall
uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
Expand All @@ -138,7 +138,7 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
.PHONY: deploy
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
$(KUSTOMIZE) build config/default | $(KUBECTL) apply -f -
$(KUSTOMIZE) build config/default | $(KUBECTL) apply --server-side=true -f -

.PHONY: undeploy
undeploy: kustomize ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
Expand All @@ -159,10 +159,10 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest-$(ENVTEST_VERSION)
GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION)

## Tool Versions
KUSTOMIZE_VERSION ?= v5.3.0
CONTROLLER_TOOLS_VERSION ?= v0.14.0
KUSTOMIZE_VERSION ?= v5.5.0
CONTROLLER_TOOLS_VERSION ?= v0.16.5
ENVTEST_VERSION ?= release-0.17
GOLANGCI_LINT_VERSION ?= v1.54.2
GOLANGCI_LINT_VERSION ?= v1.60.3

.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
Expand Down
Loading