-
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.
- Loading branch information
Showing
2 changed files
with
5 additions
and
23 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 |
---|---|---|
|
@@ -29,7 +29,6 @@ jobs: | |
fi | ||
echo "Latest tag: $latest_tag" | ||
echo "tag=$latest_tag" >> $GITHUB_ENV | ||
- name: Determine next version | ||
id: set_output | ||
run: | | ||
|
@@ -57,26 +56,15 @@ jobs: | |
echo "New version: $new_version" | ||
echo "new_version=$new_version" >> $GITHUB_ENV | ||
echo "new_version=$new_version" >> $GITHUB_OUTPUT | ||
- name: Update Helm chart version | ||
run: | | ||
sed -i "s/^version:.*/version: ${{ steps.set_output.outputs.new_version }}/" ${{ env.CHART_PATH }}/Chart.yaml | ||
sed -i "s/^appVersion:.*/appVersion: '${{ steps.set_output.outputs.new_version }}'/" ${{ env.CHART_PATH }}/Chart.yaml | ||
- name: Commit updated Helm chart version | ||
sed -i "s/version:.*/version: ${{ steps.set_output.outputs.new_version }}/" ${{ env.CHART_PATH }}/Chart.yaml | ||
- name: Create and push new tag | ||
run: | | ||
git config --global user.name 'github-actions' | ||
git config --global user.email '[email protected]' | ||
git add ${{ env.CHART_PATH }}/Chart.yaml | ||
git commit -m "Update Helm chart version to ${{ steps.set_output.outputs.new_version }}" | ||
current_branch=$(git rev-parse --abbrev-ref HEAD) | ||
git push origin $current_branch # Push changes to the current branch | ||
- name: Create and push new tag | ||
run: | | ||
git tag ${{ steps.set_output.outputs.new_version }} | ||
git push origin ${{ steps.set_output.outputs.new_version }} | ||
build-and-push-docker-api: | ||
runs-on: ubuntu-latest | ||
needs: determine-version | ||
|
@@ -92,7 +80,6 @@ jobs: | |
key: ${{ runner.os }}-api-node-modules-${{ hashFiles('src/api/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-api-node-modules- | ||
- name: Install npm dependencies for API | ||
working-directory: src/api | ||
run: npm install | ||
|
@@ -109,7 +96,6 @@ jobs: | |
key: ${{ runner.os }}-buildx-${{ hashFiles('src/api/Dockerfile', 'src/api/.dockerignore') }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx-${{ hashFiles('src/api/Dockerfile', 'src/api/.dockerignore') }}- | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
|
@@ -119,7 +105,6 @@ jobs: | |
- name: Build and push Docker image API | ||
run: | | ||
docker buildx build --platform linux/amd64,linux/arm64 --push -t ${{ env.IMAGE_NAME }}:api-${{ needs.determine-version.outputs.new_version }} --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache,mode=max ./src/api | ||
build-and-push-docker-job: | ||
runs-on: ubuntu-latest | ||
needs: determine-version | ||
|
@@ -140,7 +125,6 @@ jobs: | |
key: ${{ runner.os }}-buildx-${{ hashFiles('src/Dockerfile', 'src/.dockerignore') }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx-${{ hashFiles('src/Dockerfile', 'src/.dockerignore') }}- | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
|
@@ -150,7 +134,6 @@ jobs: | |
- name: Build and push Docker image Job | ||
run: | | ||
docker buildx build --platform linux/amd64,linux/arm64 --push -t ${{ env.IMAGE_NAME }}:job-${{ needs.determine-version.outputs.new_version }} --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache,mode=max ./src | ||
publish-helm-chart: | ||
runs-on: ubuntu-latest | ||
needs: | ||
|
@@ -177,8 +160,7 @@ jobs: | |
|
||
- name: Package Helm chart | ||
run: | | ||
helm package ${{ env.CHART_PATH }} | ||
helm package opensource | ||
- name: Push Helm chart to Docker Hub | ||
run: | | ||
helm push $(ls *.tgz) oci://registry-1.docker.io/amelieloulou |
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