-
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
35 additions
and
33 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 |
---|---|---|
|
@@ -10,43 +10,44 @@ env: | |
DEPLOYMENT: paysage-ui | ||
DEPLOYMENT_NAMESPACE: paysage | ||
DEPLOYMENT_URL: https://paysage.dataesr.ovh | ||
MM_NOTIFICATION_CHANNEL: 'bots' | ||
MM_NOTIFICATION_CHANNEL: bots | ||
|
||
jobs: | ||
publish-ghcr: | ||
name: Publish docker image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: 🏁 Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log into registry | ||
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} | ||
- name: 🏷️ Get tag | ||
id: tag | ||
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | ||
|
||
- name: Build image | ||
run: docker build -t ${{ github.repository }} --build-arg MODE=production . | ||
- name: 🔑 Login ghcr.io | ||
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get Tag | ||
id: version | ||
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | ||
- name: 🐋 Build Docker image | ||
run: | | ||
IMAGE_ID=ghcr.io/${{ github.repository }} | ||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | ||
docker build -t $IMAGE_ID:${{ steps.tag.outputs.tag }} -t $IMAGE_ID:latest --build-arg MODE=production . | ||
- name: Push image | ||
- name: 📦 Push Docker image | ||
run: | | ||
IMAGE_ID=ghcr.io/${{ github.repository }} | ||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | ||
docker tag ${{ github.repository }} $IMAGE_ID:latest | ||
docker tag ${{ github.repository }} $IMAGE_ID:${{ steps.version.outputs.tag }} | ||
docker push $IMAGE_ID:latest | ||
docker push $IMAGE_ID:${{ steps.version.outputs.tag }} | ||
docker push -a $IMAGE_ID | ||
deploy: | ||
name: Update production deployment | ||
runs-on: ubuntu-latest | ||
needs: publish-ghcr | ||
steps: | ||
- name: Check Out Repo | ||
- name: 🏁 Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Deploy to Cluster | ||
- name: ☁️ Deploy to Cluster | ||
id: kubectl-deploy | ||
uses: dataesr/[email protected] | ||
env: | ||
|
@@ -58,7 +59,7 @@ jobs: | |
release: | ||
name: Release new version | ||
runs-on: ubuntu-latest | ||
needs: publish-ghcr | ||
needs: deploy | ||
steps: | ||
- name: Check Out Repo | ||
uses: actions/checkout@v4 | ||
|
@@ -84,9 +85,7 @@ jobs: | |
body: "${{ steps.changelog.outputs.changes }}" | ||
|
||
notify: | ||
needs: | ||
- deploy | ||
- release | ||
needs: release | ||
if: always() | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
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