Skip to content

Merge pull request #4 from BouyguesTelecom/remove/pull-secret-job #6

Merge pull request #4 from BouyguesTelecom/remove/pull-secret-job

Merge pull request #4 from BouyguesTelecom/remove/pull-secret-job #6

Workflow file for this run

name: CI Docker and Helm
on:
push:
branches:
- main
env:
IMAGE_NAME: amelieloulou/transform-and-deliver-assets
CHART_PATH: ./opensource
jobs:
build-and-push-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image API
uses: docker/build-push-action@v5
with:
context: ./src/api
push: true
tags: ${{ env.IMAGE_NAME }}:latest
- name: Build and push Docker image job
uses: docker/build-push-action@v5
with:
context: ./src
push: true
tags: ${{ env.IMAGE_NAME }}:job-latest
publish-helm-chart:
runs-on: ubuntu-latest
needs: build-and-push-docker
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.11.1
- name: Package Helm chart
run: |
helm package opensource
- name: Push Helm chart to Docker Hub
run: |
helm push $(ls *.tgz) oci://registry-1.docker.io/amelieloulou