Skip to content

Commit d7e472e

Browse files
authored
Push images to ghcr.io (#631)
Signed-off-by: Cintia Sánchez García <cynthiasg@icloud.com>
1 parent c383f85 commit d7e472e

4 files changed

Lines changed: 18 additions & 16 deletions

File tree

.github/workflows/chart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Python
2323
uses: actions/setup-python@v5
2424
with:
25-
python-version: 3.7
25+
python-version: 3.8
2626
- name: Set up chart-testing
2727
uses: helm/chart-testing-action@v2.7.0
2828
- name: Run chart-testing (list-changed)

.github/workflows/release.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,35 @@ permissions: read-all
1010
jobs:
1111
build-and-publish-images:
1212
runs-on: ubuntu-latest
13+
permissions:
14+
packages: write
1315
steps:
1416
- name: Checkout code
1517
uses: actions/checkout@v4
16-
- name: Login to AWS Public ECR
18+
- name: Login to GitHub Container Registry
1719
uses: docker/login-action@v3
1820
with:
19-
registry: public.ecr.aws
20-
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
21-
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
21+
registry: ghcr.io
22+
username: ${{ github.actor }}
23+
password: ${{ secrets.GITHUB_TOKEN }}
2224
- name: Extract tag name
2325
id: extract_tag_name
2426
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
2527
- name: Build and push gitvote-dbmigrator image
2628
run: |
2729
docker build \
2830
-f database/migrations/Dockerfile \
29-
-t public.ecr.aws/g6m3a0y9/gitvote-dbmigrator:${{steps.extract_tag_name.outputs.tag}} \
30-
-t public.ecr.aws/g6m3a0y9/gitvote-dbmigrator:latest \
31+
-t ghcr.io/${{ github.repository }}/dbmigrator:${{steps.extract_tag_name.outputs.tag}} \
32+
-t ghcr.io/${{ github.repository }}/dbmigrator:latest \
3133
.
32-
docker push --all-tags public.ecr.aws/g6m3a0y9/gitvote-dbmigrator
34+
docker push --all-tags ghcr.io/${{ github.repository }}/dbmigrator
3335
- name: Build and push gitvote image
3436
run: |
3537
docker build \
36-
-t public.ecr.aws/g6m3a0y9/gitvote:${{steps.extract_tag_name.outputs.tag}} \
37-
-t public.ecr.aws/g6m3a0y9/gitvote:latest \
38+
-t ghcr.io/${{ github.repository }}/server:${{steps.extract_tag_name.outputs.tag}} \
39+
-t ghcr.io/${{ github.repository }}/server:latest \
3840
.
39-
docker push --all-tags public.ecr.aws/g6m3a0y9/gitvote
41+
docker push --all-tags ghcr.io/${{ github.repository }}/server
4042
4143
package-and-publish-helm-chart:
4244
needs:

charts/gitvote/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: gitvote
33
description: GitVote is a GitHub application that allows holding a vote on issues and pull requests
44
type: application
5-
version: 1.4.0
5+
version: 1.4.1
66
appVersion: 1.4.0
77
kubeVersion: ">= 1.19.0-0"
88
home: https://gitvote.dev
@@ -41,9 +41,9 @@ annotations:
4141
artifacthub.io/containsSecurityUpdates: "true"
4242
artifacthub.io/images: |
4343
- name: dbmigrator
44-
image: public.ecr.aws/g6m3a0y9/gitvote-dbmigrator:v1.4.0
44+
image: ghcr.io/cncf/gitvote/dbmigrator:v1.4.1
4545
- name: gitvote
46-
image: public.ecr.aws/g6m3a0y9/gitvote:v1.4.0
46+
image: ghcr.io/cncf/gitvote/server:v1.4.1
4747
artifacthub.io/links: |
4848
- name: source
4949
url: https://github.com/cncf/gitvote

charts/gitvote/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dbmigrator:
3636
job:
3737
image:
3838
# Database migrator image repository (without the tag)
39-
repository: public.ecr.aws/g6m3a0y9/gitvote-dbmigrator
39+
repository: ghcr.io/cncf/gitvote/dbmigrator
4040

4141
# GitVote service configuration
4242
gitvote:
@@ -74,7 +74,7 @@ gitvote:
7474
deploy:
7575
replicaCount: 1
7676
image:
77-
repository: public.ecr.aws/g6m3a0y9/gitvote
77+
repository: ghcr.io/cncf/gitvote/server
7878
resources: {}
7979

8080
# PostgreSQL configuration

0 commit comments

Comments
 (0)