fix: update frontend workflows to use short SHA for image tagging
All checks were successful
Build and Deploy Frontend Learner / Build Frontend Learner Docker Image (push) Successful in 15s
Build and Deploy Frontend Management to Dev Server / Build Frontend Management Docker Image (push) Successful in 18s
Build and Deploy Frontend Learner / Deploy E-learning Frontend Learner to Dev Server (push) Successful in 3s
Build and Deploy Frontend Management to Dev Server / Deploy E-learning Frontend Management to Dev Server (push) Successful in 2s
Build and Deploy Frontend Learner / Notify Deployment Status (push) Successful in 1s
Build and Deploy Frontend Management to Dev Server / Notify Deployment Status (push) Successful in 1s
All checks were successful
Build and Deploy Frontend Learner / Build Frontend Learner Docker Image (push) Successful in 15s
Build and Deploy Frontend Management to Dev Server / Build Frontend Management Docker Image (push) Successful in 18s
Build and Deploy Frontend Learner / Deploy E-learning Frontend Learner to Dev Server (push) Successful in 3s
Build and Deploy Frontend Management to Dev Server / Deploy E-learning Frontend Management to Dev Server (push) Successful in 2s
Build and Deploy Frontend Learner / Notify Deployment Status (push) Successful in 1s
Build and Deploy Frontend Management to Dev Server / Notify Deployment Status (push) Successful in 1s
- Add short_sha generation and output to build jobs - Update deploy scripts to use short SHA instead of full SHA - Change env var names to FRONTEND_LEARNER_TAG and FRONTEND_MGMT_TAG - Matches backend workflow implementation for consistency
This commit is contained in:
parent
d63c986c6f
commit
08ab6f0315
2 changed files with 14 additions and 4 deletions
|
|
@ -16,7 +16,6 @@ env:
|
||||||
|
|
||||||
# Docker Image
|
# Docker Image
|
||||||
IMAGE_NAME: chamomind/elearning-learner
|
IMAGE_NAME: chamomind/elearning-learner
|
||||||
IMAGE_TAG: ${{ github.sha }}
|
|
||||||
|
|
||||||
# Notifications
|
# Notifications
|
||||||
DISCORD_WEBHOOK_URL: ${{ vars.DISCORD_WEBHOOK_URL }}
|
DISCORD_WEBHOOK_URL: ${{ vars.DISCORD_WEBHOOK_URL }}
|
||||||
|
|
@ -25,10 +24,16 @@ jobs:
|
||||||
build:
|
build:
|
||||||
name: Build Frontend Learner Docker Image
|
name: Build Frontend Learner Docker Image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
short_sha: ${{ steps.short_sha.outputs.sha }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Generate short SHA
|
||||||
|
id: short_sha
|
||||||
|
run: echo "sha=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Log in to Container Registry
|
- name: Log in to Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
|
|
@ -80,7 +85,7 @@ jobs:
|
||||||
script: |
|
script: |
|
||||||
cd ~/repo
|
cd ~/repo
|
||||||
chmod +x ./replace-env.sh ./deploy.sh
|
chmod +x ./replace-env.sh ./deploy.sh
|
||||||
./replace-env.sh FRONTEND_TAG "${{ env.IMAGE_TAG }}"
|
./replace-env.sh FRONTEND_LEARNER_TAG "${{ needs.build.outputs.short_sha }}"
|
||||||
./deploy.sh elearning-learner
|
./deploy.sh elearning-learner
|
||||||
|
|
||||||
notify:
|
notify:
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ env:
|
||||||
|
|
||||||
# Docker Image
|
# Docker Image
|
||||||
IMAGE_NAME: chamomind/elearning-management
|
IMAGE_NAME: chamomind/elearning-management
|
||||||
IMAGE_TAG: ${{ github.sha }}
|
|
||||||
|
|
||||||
# Notifications
|
# Notifications
|
||||||
DISCORD_WEBHOOK_URL: ${{ vars.DISCORD_WEBHOOK_URL }}
|
DISCORD_WEBHOOK_URL: ${{ vars.DISCORD_WEBHOOK_URL }}
|
||||||
|
|
@ -25,10 +24,16 @@ jobs:
|
||||||
build:
|
build:
|
||||||
name: Build Frontend Management Docker Image
|
name: Build Frontend Management Docker Image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
short_sha: ${{ steps.short_sha.outputs.sha }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Generate short SHA
|
||||||
|
id: short_sha
|
||||||
|
run: echo "sha=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Log in to Container Registry
|
- name: Log in to Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
|
|
@ -80,7 +85,7 @@ jobs:
|
||||||
script: |
|
script: |
|
||||||
cd ~/repo
|
cd ~/repo
|
||||||
chmod +x ./replace-env.sh ./deploy.sh
|
chmod +x ./replace-env.sh ./deploy.sh
|
||||||
./replace-env.sh MANAGEMENT_TAG "${{ env.IMAGE_TAG }}"
|
./replace-env.sh FRONTEND_MGMT_TAG "${{ needs.build.outputs.short_sha }}"
|
||||||
./deploy.sh elearning-management
|
./deploy.sh elearning-management
|
||||||
|
|
||||||
notify:
|
notify:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue