Skip to content

Commit b6d2a01

Browse files
authored
Merge branch 'main' into feature/vcluster
2 parents 8f5cbeb + 0e1cc68 commit b6d2a01

File tree

2 files changed

+25
-30
lines changed

2 files changed

+25
-30
lines changed

.github/workflows/docker-build-on-tag.yml

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,25 @@ jobs:
1010

1111
runs-on: ubuntu-latest
1212

13+
permissions:
14+
contents: 'read'
15+
id-token: 'write'
16+
1317
steps:
14-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
19+
20+
- uses: 'google-github-actions/auth@v2'
21+
with:
22+
project_id: 'genuine-flight-317411'
23+
workload_identity_provider: 'projects/429189597230/locations/global/workloadIdentityPools/github/providers/robusta-repos'
24+
25+
- name: Set up gcloud CLI
26+
uses: google-github-actions/setup-gcloud@v2
27+
with:
28+
project_id: genuine-flight-317411
29+
30+
- name: Configure Docker Registry
31+
run: gcloud auth configure-docker us-central1-docker.pkg.dev
1532

1633
- name: Login to Docker Hub
1734
uses: docker/login-action@v1
@@ -28,32 +45,8 @@ jobs:
2845
context: .
2946
platforms: linux/arm64,linux/amd64
3047
push: true
31-
tags: robustadev/krr:${{ github.ref_name }}
48+
tags: |
49+
robustadev/krr:${{ github.ref_name }}
50+
us-central1-docker.pkg.dev/genuine-flight-317411/devel/krr:${{ github.ref_name }}
3251
build-args: |
33-
BUILDKIT_INLINE_CACHE=1
34-
35-
- name: Set up gcloud CLI
36-
uses: google-github-actions/setup-gcloud@v0.2.0
37-
with:
38-
service_account_key: ${{ secrets.GCP_SA_KEY }}
39-
project_id: genuine-flight-317411
40-
export_default_credentials: true
41-
42-
# Configure Docker to use the gcloud command-line tool as a credential helper for authentication
43-
- name: Configure Docker
44-
run: |-
45-
gcloud auth configure-docker us-central1-docker.pkg.dev
46-
47-
- name: Verify gcloud configuration
48-
run: |-
49-
gcloud config get-value project
50-
51-
- name: Release Docker to old repo
52-
run: |-
53-
docker buildx build \
54-
--build-arg BUILDKIT_INLINE_CACHE=1 \
55-
--platform linux/arm64,linux/amd64 \
56-
--cache-from robustadev/krr:${{ github.ref_name }} \
57-
--tag us-central1-docker.pkg.dev/genuine-flight-317411/devel/krr:${{ github.ref_name }} \
58-
--push \
59-
.
52+
BUILDKIT_INLINE_CACHE=1

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ RUN python -m ensurepip --upgrade
2525
RUN pip install --no-cache-dir -r requirements.txt
2626

2727
# Copy the rest of the application code
28-
COPY . .
28+
COPY ./krr.py krr.py
29+
COPY ./robusta_krr/ robusta_krr/
30+
COPY ./intro.txt intro.txt
2931

3032
# Run the application using 'poetry run krr simple'
3133
CMD ["python", "krr.py", "simple"]

0 commit comments

Comments
 (0)