-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DEBUG] test the CI - separate each steps for mor visibility on the b…
…uilds
- Loading branch information
Showing
1 changed file
with
58 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,65 @@ | ||
name: CI Docker and Helm | ||
|
||
on: | ||
push: | ||
branches: | ||
- workflow/api-improve | ||
push: | ||
branches: | ||
- workflow/api-improve | ||
|
||
env: | ||
IMAGE_NAME: amelieloulou/transform-and-deliver-assets | ||
CHART_PATH: ./opensource | ||
IMAGE_NAME: amelieloulou/transform-and-deliver-assets | ||
CHART_PATH: ./opensource | ||
|
||
jobs: | ||
checkout: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
setup-docker: | ||
runs-on: ubuntu-latest | ||
needs: checkout | ||
|
||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
install: true | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
build-and-push-docker-api: | ||
runs-on: ubuntu-latest | ||
needs: setup-docker | ||
|
||
steps: | ||
- name: Debug - List files in src/api | ||
run: ls -la ./src/api | ||
|
||
- name: Build and push Docker image API | ||
run: | | ||
docker buildx build --platform linux/amd64,linux/arm64 --push -t ${{ env.IMAGE_NAME }}:latest ./src/api | ||
build-and-push-docker-job: | ||
runs-on: ubuntu-latest | ||
needs: setup-docker | ||
|
||
steps: | ||
- name: Debug - List files in src | ||
run: ls -la ./src | ||
|
||
- name: Build and push Docker image Job | ||
run: | | ||
docker buildx build --platform linux/amd64,linux/arm64 --push -t ${{ env.IMAGE_NAME }}:job-latest ./src | ||
publish-helm-chart: | ||
runs-on: ubuntu-latest | ||
needs: [build-and-push-docker-api, build-and-push-docker-job] | ||
|
||
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 | ||
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 | ||
with: | ||
install: true | ||
|
||
- 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 | ||
run: | | ||
docker buildx build --platform linux/amd64,linux/arm64 --push -t ${{ env.IMAGE_NAME }}:latest ./src/api | ||
- name: Build and push Docker image Job | ||
run: | | ||
docker buildx build --platform linux/amd64,linux/arm64 --push -t ${{ env.IMAGE_NAME }}:job-latest ./src | ||
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 |