Skip to content

Commit ac60e40

Browse files
authored
Added ECR registry (#35)
* Added ECR registry * Added ECR registry * Use ECR * Use ECR * Fix README * Fix README * Fix README
1 parent c33c18f commit ac60e40

File tree

6 files changed

+11
-65
lines changed

6 files changed

+11
-65
lines changed

.github/workflows/feature-branch.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@ on:
77
permissions:
88
pull-requests: write
99
deployments: write
10+
id-token: write
11+
contents: read
1012

1113
jobs:
1214
perform:
1315
uses: cloudposse/github-actions-workflows/.github/workflows/dockerized-app-feature-branch.yml@main
1416
with:
1517
organization: "${{ github.event.repository.owner.login }}"
1618
repository: "${{ github.event.repository.name }}"
17-
registry: registry.hub.docker.com
1819
open: ${{ github.event.pull_request.state == 'open' }}
1920
labels: ${{ toJSON(github.event.pull_request.labels.*.name) }}
2021
ref: ${{ github.event.pull_request.head.ref }}
2122
secrets:
22-
docker-login: "${{ secrets.DOCKERHUB_USERNAME }}"
23-
docker-password: "${{ secrets.DOCKERHUB_PASSWORD }}"
2423
github-private-actions-pat: "${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}"
24+
registry: "${{ secrets.ECR_REGISTRY }}"
25+
secret-outputs-passphrase: "${{ secrets.GHA_SECRET_OUTPUT_PASSPHRASE }}"

.github/workflows/main-branch.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ jobs:
1313
with:
1414
organization: "${{ github.event.repository.owner.login }}"
1515
repository: "${{ github.event.repository.name }}"
16-
registry: registry.hub.docker.com
1716
secrets:
18-
docker-login: "${{ secrets.DOCKERHUB_USERNAME }}"
19-
docker-password: "${{ secrets.DOCKERHUB_PASSWORD }}"
2017
github-private-actions-pat: "${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}"
18+
registry: "${{ secrets.ECR_REGISTRY }}"
19+
secret-outputs-passphrase: "${{ secrets.GHA_SECRET_OUTPUT_PASSPHRASE }}"

.github/workflows/release.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ jobs:
1212
with:
1313
organization: "${{ github.event.repository.owner.login }}"
1414
repository: "${{ github.event.repository.name }}"
15-
registry: registry.hub.docker.com
1615
version: ${{ github.event.release.tag_name }}
1716
secrets:
18-
docker-login: "${{ secrets.DOCKERHUB_USERNAME }}"
19-
docker-password: "${{ secrets.DOCKERHUB_PASSWORD }}"
2017
github-private-actions-pat: "${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}"
18+
registry: "${{ secrets.ECR_REGISTRY }}"
19+
secret-outputs-passphrase: "${{ secrets.GHA_SECRET_OUTPUT_PASSPHRASE }}"

deploy/helmfile.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ environments:
66
production:
77

88
helmfiles:
9-
# - "releases/pull-secret.yaml"
10-
- path: "./releases/app.yaml"
9+
- path: "releases/app.yaml"
1110
values:
1211
-
1312
{{ .Values | toYaml | indent 8 }}

deploy/releases/app.yaml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,19 @@ releases:
2020
# References:
2121
# - https://github.com/cloudposse/charts/blob/master/incubator/monochart
2222
#
23-
- name: '{{ requiredEnv "RELEASE_NAME" }}'
23+
- name: 'example-app'
2424
labels:
25-
color: "{{ requiredEnv "COLOR" }}"
2625
preview: "true"
2726
chart: "cloudposse-incubator/monochart"
2827
version: "0.22.0"
2928
wait: true
3029
force: true
3130
recreatePods: false
3231
values:
33-
- fullnameOverride: "example-{{ requiredEnv "COLOR" }}"
34-
image:
32+
- image:
3533
repository: '{{ env "IMAGE_NAME" | default "cloudposse/example-app" }}'
3634
tag: '{{ env "IMAGE_TAG" | default "0.1.0" }}'
3735
pullPolicy: Always
38-
#pullSecrets:
39-
# - "{{ requiredEnv "RELEASE_NAME" }}-pull-secret-dockercfg "
4036
replicaCount: 2
4137
# Deployment configuration
4238
deployment:
@@ -51,11 +47,6 @@ releases:
5147
configMaps:
5248
default:
5349
enabled: true
54-
env:
55-
# Color to deploy
56-
#COLOR: "#0099ff" # Blue
57-
#COLOR: "#009900" # Green
58-
COLOR: "{{ env "COLOR" }}"
5950

6051
# Service endpoint
6152
service:

deploy/releases/pull-secret.yaml

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)