Skip to content

Commit

Permalink
chore(actions): push image to dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Vieira committed Oct 18, 2023
1 parent d23c235 commit b1781b4
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/prereleased.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ env:
DOCKER_REPOSITORY: aws-adapter
CONTAINER: aws-adapter-container-image

DOCKERHUB_REGISTRY: ydata
DOCKER_REPOSITORY_PREFIX: aws-adapter

AWS_S3_REGION: ${{ secrets.AWS_S3_REGION }}
SBOM_FILENAME: docker-sbom
NOTION_DATABASE_ID: ${{ secrets.NOTION_REPOS_DATABASE_ID }}
Expand Down Expand Up @@ -149,6 +152,19 @@ jobs:
docker tag ${{ steps.docker_build.outputs.imageId }} ${{ env.DOCKER_IMAGE_TAG }}
docker push ${{ env.DOCKER_IMAGE_TAG }}
- name: Login to Dockerhub Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Push Docker Image
env:
DOCKER_IMAGE_TAG: ${{ env.DOCKERHUB_REGISTRY }}/${{ env.DOCKER_REPOSITORY_PREFIX }}-${{ matrix.package }}:${{ needs.prepare.outputs.version }}
run: |
docker tag ${{ steps.docker_build.outputs.imageId }} ${{ env.DOCKER_IMAGE_TAG }}
docker push ${{ env.DOCKER_IMAGE_TAG }}
update-manifests:
name: Update Manifests
Expand Down Expand Up @@ -184,6 +200,26 @@ jobs:
cd ${COMPONENT_PATH}
kustomize edit set image ${CONTAINER_PKG}=${DOCKER_IMAGE_TAG}
- name: setup-yq
uses: chrisdickinson/[email protected]

- name: Change cronjob on metering
if: matrix.package == 'metering'
env:
DOCKER_IMAGE_TAG: ${{ env.DOCKERHUB_REGISTRY }}/${{ env.DOCKER_REPOSITORY_PREFIX }}-${{ matrix.package }}:${{ needs.prepare.outputs.version }}
run:|
cd ${COMPONENT_PATH}
yq w -i metering-adapter/base/cronjob.yaml 'spec.jobTemplate.spec.template.spec.containers[0].image' ${DOCKER_IMAGE_TAG}


- name: Change deployment on quota
if: matrix.package == 'quota'
env:
DOCKER_IMAGE_TAG: ${{ env.DOCKERHUB_REGISTRY }}/${{ env.DOCKER_REPOSITORY_PREFIX }}-${{ matrix.package }}:${{ needs.prepare.outputs.version }}
run:|
cd ${COMPONENT_PATH}
yq w -i quota-adapter/base/deployment.yaml 'spec.template.spec.containers[0].image' ${DOCKER_IMAGE_TAG}

- name: Commit and push image update into manifests repo
env:
VERSION: ${{ needs.prepare.outputs.version }}
Expand Down

0 comments on commit b1781b4

Please sign in to comment.