update the workflow 2
Some checks failed
Some checks failed
This commit is contained in:
@@ -39,10 +39,6 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: '3.12'
|
|
||||||
|
|
||||||
- name: Lint backend code
|
- name: Lint backend code
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
name: Frontend CI/CD
|
name: Frontend CI/CD
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
# push:
|
||||||
branches: ['**']
|
# branches: ['**']
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@@ -25,62 +25,62 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Configure AWS credentials
|
# - name: Configure AWS credentials
|
||||||
uses: aws-actions/configure-aws-credentials@v4
|
# uses: aws-actions/configure-aws-credentials@v4
|
||||||
with:
|
# with:
|
||||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
aws-region: us-east-1
|
# aws-region: us-east-1
|
||||||
|
|
||||||
- name: Login to Amazon ECR Public
|
# - name: Login to Amazon ECR Public
|
||||||
id: login-ecr
|
# id: login-ecr
|
||||||
uses: aws-actions/amazon-ecr-login@v2
|
# uses: aws-actions/amazon-ecr-login@v2
|
||||||
with:
|
# with:
|
||||||
registry-type: public
|
# registry-type: public
|
||||||
mask-password: 'true'
|
# mask-password: 'true'
|
||||||
|
|
||||||
- name: Setup Node.js
|
# - name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
# uses: actions/setup-node@v4
|
||||||
with:
|
# with:
|
||||||
node-version: '20'
|
# node-version: '20'
|
||||||
cache: 'npm'
|
# cache: 'npm'
|
||||||
cache-dependency-path: ${{ env.FRONTEND_DIR }}/package-lock.json
|
# cache-dependency-path: ${{ env.FRONTEND_DIR }}/package-lock.json
|
||||||
|
|
||||||
- name: Install dependencies
|
# - name: Install dependencies
|
||||||
run: npm ci
|
# run: npm ci
|
||||||
working-directory: ./${{ env.FRONTEND_DIR }}
|
# working-directory: ./${{ env.FRONTEND_DIR }}
|
||||||
|
|
||||||
- name: Build frontend (verify)
|
# - name: Build frontend (verify)
|
||||||
run: npm run build
|
# run: npm run build
|
||||||
working-directory: ./${{ env.FRONTEND_DIR }}
|
# working-directory: ./${{ env.FRONTEND_DIR }}
|
||||||
|
|
||||||
- name: Extract metadata for Docker
|
# - name: Extract metadata for Docker
|
||||||
id: meta
|
# id: meta
|
||||||
uses: docker/metadata-action@v5
|
# uses: docker/metadata-action@v5
|
||||||
with:
|
# with:
|
||||||
images: ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}
|
# images: ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}
|
||||||
tags: |
|
# tags: |
|
||||||
type=ref,event=branch
|
# type=ref,event=branch
|
||||||
type=sha,prefix=
|
# type=sha,prefix=
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
# type=raw,value=latest,enable={{is_default_branch}}
|
||||||
labels: |
|
# labels: |
|
||||||
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
|
# org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
|
||||||
org.opencontainers.image.revision=${{ github.sha }}
|
# org.opencontainers.image.revision=${{ github.sha }}
|
||||||
org.opencontainers.image.title=Lumina MSK Frontend
|
# org.opencontainers.image.title=Lumina MSK Frontend
|
||||||
|
|
||||||
- name: Build and push Docker image
|
# - name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v5
|
# uses: docker/build-push-action@v5
|
||||||
with:
|
# with:
|
||||||
context: ./${{ env.FRONTEND_DIR }}
|
# context: ./${{ env.FRONTEND_DIR }}
|
||||||
file: ./${{ env.FRONTEND_DIR }}/Dockerfile
|
# file: ./${{ env.FRONTEND_DIR }}/Dockerfile
|
||||||
push: true
|
# push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
# tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
# labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=gha
|
# cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
# cache-to: type=gha,mode=max
|
||||||
|
|
||||||
- name: Image digest
|
# - name: Image digest
|
||||||
run: echo "Pushed ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ steps.meta.outputs.tags }}"
|
# run: echo "Pushed ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ steps.meta.outputs.tags }}"
|
||||||
|
|
||||||
notify-deploy:
|
notify-deploy:
|
||||||
needs: build-and-push
|
needs: build-and-push
|
||||||
|
|||||||
Reference in New Issue
Block a user