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: add ecr push action #624

Merged
merged 5 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
23 changes: 22 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,16 @@ jobs:
egress-policy: audit

- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Publish to Registry

- name: Login to ECR
id: ecr
uses: elgohr/ecr-login-action@v3
with:
access_key: ${{ secrets.ECR_AWS_ACCESS_KEY }}
secret_access_key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
region: ${{ secrets.ECR_AWS_REGION }}

- name: Publish to DockerHub Registry
uses: elgohr/Publish-Docker-Github-Action@43dc228e327224b2eda11c8883232afd5b34943b # v5
with:
name: flanksource/config-db
Expand All @@ -77,6 +86,18 @@ jobs:
snapshot: true
dockerfile: build/Dockerfile
tags: "latest,v${{ needs.semantic-release.outputs.release-version }}"

- name: Publish to AWS ECR
uses: elgohr/Publish-Docker-Github-Action@43dc228e327224b2eda11c8883232afd5b34943b # v5
with:
name: config-db
username: ${{ steps.ecr.outputs.username }}
password: ${{ steps.ecr.outputs.password }}
registry: ${{ steps.ecr.outputs.registry }}
snapshot: true
dockerfile: build/Dockerfile
tags: "latest,v${{ needs.semantic-release.outputs.release-version }}"

helm:
runs-on: ubuntu-latest
needs: [semantic-release, docker]
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
fsGroup: 1000
containers:
- name: {{ include "config-db.name" . }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
image: "{{ tpl .Values.global.image.repository . }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

global.imageRegistry

imagePullPolicy: {{ .Values.image.pullPolicy }}
livenessProbe:
failureThreshold: 3
Expand Down
4 changes: 3 additions & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Declare variables to be passed into your templates.

global:
image:
repository: docker.io/flanksource
db:
connectionPooler:
enabled: false
Expand All @@ -18,7 +20,7 @@ nameOverride: ''
disablePostgrest: false

image:
repository: docker.io/flanksource/config-db
name: config-db
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: 'latest'
Expand Down
Loading