Skip to content

Commit

Permalink
chore: updated pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
chideat committed Aug 28, 2024
1 parent 956dbe9 commit 4158ebf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/pr-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
build:
name: Build and push Docker image
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4.1.7
Expand Down Expand Up @@ -67,18 +68,18 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v3.0.0

- name: Docker Login
- name: Github Package Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_TOKEN }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
file: ./build/Dockerfile
context: .
push: true
tags: ghcr.io/${{ github.repository_owner }}/redis-operator:${{ env.VERSION }}-${{ env.BRANCH_NAME }}-${{ env.COMMIT_SHA }}
platforms: linux/amd64,linux/arm64
tags: ghcr.io/${{ github.actor }}/redis-operator:${{ env.VERSION }}-${{ env.BRANCH_NAME }}-${{ env.COMMIT_SHA }}
platforms: linux/amd64
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ COPY Makefile Makefile
# Dependencies are cached unless we change go.mod or go.sum
COPY go.mod go.mod
COPY go.sum go.sum
RUN GOPROXY=https://goproxy.cn,direct go mod download
RUN go mod download

RUN CGO_ENABLED=0 go build -a -tags timetzdata -buildmode=pie -ldflags '-extldflags "-Wl,-z,relro,-z,now"' -a -o manager cmd/main.go
RUN CGO_ENABLED=0 go build -a -tags timetzdata -buildmode=pie -ldflags '-extldflags "-Wl,-z,relro,-z,now"' -a -o redis-tools cmd/redis-tools/main.go
Expand Down

0 comments on commit 4158ebf

Please sign in to comment.