Skip to content

Commit

Permalink
Migrate container images to ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
andmat900 committed Jan 24, 2025
1 parent 0e39e47 commit d38ce19
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 27 deletions.
60 changes: 40 additions & 20 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ jobs:
- name: Build app image
run: docker build . --tag image

- name: Log into registry
run: echo "${{ secrets.REGISTRYPASSWORD }}" | docker login registry.nordix.org -u ${{ secrets.REGISTRYUSERNAME }} --password-stdin
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push app image
id: image
run: |
IMAGE_ID=registry.nordix.org/eiffel/etos-api
IMAGE_ID=ghcr.io/eiffel-community/etos-api
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
Expand All @@ -45,13 +49,17 @@ jobs:
- name: Build app image
run: docker build . -f deploy/etos-sse/Dockerfile --tag image

- name: Log into registry
run: echo "${{ secrets.REGISTRYPASSWORD }}" | docker login registry.nordix.org -u ${{ secrets.REGISTRYUSERNAME }} --password-stdin
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push app image
id: image
run: |
IMAGE_ID=registry.nordix.org/eiffel/etos-sse
IMAGE_ID=ghcr.io/eiffel-community/etos-sse
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
Expand All @@ -74,13 +82,17 @@ jobs:
- name: Build app image
run: docker build . -f deploy/etos-logarea/Dockerfile --tag image

- name: Log into registry
run: echo "${{ secrets.REGISTRYPASSWORD }}" | docker login registry.nordix.org -u ${{ secrets.REGISTRYUSERNAME }} --password-stdin
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push app image
id: image
run: |
IMAGE_ID=registry.nordix.org/eiffel/etos-logarea
IMAGE_ID=ghcr.io/eiffel-community/etos-logarea
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
Expand All @@ -103,13 +115,17 @@ jobs:
- name: Build app image
run: docker build . -f deploy/etos-iut/Dockerfile --tag image

- name: Log into registry
run: echo "${{ secrets.REGISTRYPASSWORD }}" | docker login registry.nordix.org -u ${{ secrets.REGISTRYUSERNAME }} --password-stdin
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push app image
id: image
run: |
IMAGE_ID=registry.nordix.org/eiffel/etos-iut
IMAGE_ID=ghcr.io/eiffel-community/etos-iut
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
Expand All @@ -132,13 +148,17 @@ jobs:
- name: Build app image
run: docker build . -f deploy/etos-executionspace/Dockerfile --tag image

- name: Log into registry
run: echo "${{ secrets.REGISTRYPASSWORD }}" | docker login registry.nordix.org -u ${{ secrets.REGISTRYUSERNAME }} --password-stdin
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push app image
id: image
run: |
IMAGE_ID=registry.nordix.org/eiffel/etos-executionspace
IMAGE_ID=ghcr.io/eiffel-community/etos-executionspace
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
Expand All @@ -165,19 +185,19 @@ jobs:
changes: |
{
"manifests/base/sse/deployment.yaml": {
"spec.template.spec.containers[0].image": "registry.nordix.org/eiffel/etos-sse:${{ needs.build_sse.outputs.sseVersion }}"
"spec.template.spec.containers[0].image": "ghcr.io/eiffel-community/etos-sse:${{ needs.build_sse.outputs.sseVersion }}"
},
"manifests/base/api/deployment.yaml": {
"spec.template.spec.containers[0].image": "registry.nordix.org/eiffel/etos-api:${{ needs.build_api.outputs.apiVersion }}"
"spec.template.spec.containers[0].image": "ghcr.io/eiffel-community/etos-api:${{ needs.build_api.outputs.apiVersion }}"
},
"manifests/base/logarea/deployment.yaml": {
"spec.template.spec.containers[0].image": "registry.nordix.org/eiffel/etos-logarea:${{ needs.build_logarea.outputs.logAreaVersion }}"
"spec.template.spec.containers[0].image": "ghcr.io/eiffel-community/etos-logarea:${{ needs.build_logarea.outputs.logAreaVersion }}"
},
"manifests/base/iut/deployment.yaml": {
"spec.template.spec.containers[0].image": "registry.nordix.org/eiffel/etos-iut:${{ needs.build_iut.outputs.iutVersion }}"
"spec.template.spec.containers[0].image": "ghcr.io/eiffel-community/etos-iut:${{ needs.build_iut.outputs.iutVersion }}"
},
"manifests/base/executionspace/deployment.yaml": {
"spec.template.spec.containers[0].image": "registry.nordix.org/eiffel/etos-executionspace:${{ needs.build_executionspace.outputs.executionSpaceVersion }}"
"spec.template.spec.containers[0].image": "ghcr.io/eiffel-community/etos-executionspace:${{ needs.build_executionspace.outputs.executionSpaceVersion }}"
}
}
branch: main
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export GOBUILD := go build
export PATH := $(GOBIN):$(PATH)

export RELEASE_VERSION ?= $(shell git describe --always)
export DOCKER_REGISTRY ?= registry.nordix.org
export DOCKER_NAMESPACE ?= eiffel
export DOCKER_REGISTRY ?= ghcr.io
export DOCKER_NAMESPACE ?= eiffel-community
export DEPLOY ?= etos-sse

PROGRAMS = sse logarea iut executionspace
Expand Down
2 changes: 1 addition & 1 deletion manifests/base/api/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
serviceAccountName: etos-api
containers:
- name: etos-api
image: registry.nordix.org/eiffel/etos-api:a1acf6b2
image: ghcr.io/eiffel-community/etos-api:a1acf6b2
imagePullPolicy: IfNotPresent
ports:
- name: http
Expand Down
2 changes: 1 addition & 1 deletion manifests/base/executionspace/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
serviceAccountName: etos-executionspace
containers:
- name: etos-executionspace
image: registry.nordix.org/eiffel/etos-executionspace:a1acf6b2
image: ghcr.io/eiffel-community/etos-executionspace:a1acf6b2
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
Expand Down
2 changes: 1 addition & 1 deletion manifests/base/iut/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
serviceAccountName: etos-iut
containers:
- name: etos-iut
image: registry.nordix.org/eiffel/etos-iut:a1acf6b2
image: ghcr.io/eiffel-community/etos-iut:a1acf6b2
imagePullPolicy: IfNotPresent
env:
- name: SERVICE_HOST
Expand Down
2 changes: 1 addition & 1 deletion manifests/base/logarea/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
serviceAccountName: etos-logarea
containers:
- name: etos-logarea
image: registry.nordix.org/eiffel/etos-logarea:a1acf6b2
image: ghcr.io/eiffel-community/etos-logarea:a1acf6b2
imagePullPolicy: IfNotPresent
env:
- name: SERVICE_HOST
Expand Down
2 changes: 1 addition & 1 deletion manifests/base/sse/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
serviceAccountName: etos-sse
containers:
- name: etos-sse
image: registry.nordix.org/eiffel/etos-sse:a1acf6b2
image: ghcr.io/eiffel-community/etos-sse:a1acf6b2
imagePullPolicy: IfNotPresent
env:
- name: SERVICE_HOST
Expand Down

0 comments on commit d38ce19

Please sign in to comment.