bring out new training page design #25
Workflow file for this run
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
name: 'Linter and Builder checker 🚀' | |
on: | |
pull_request: | |
branches: | |
- 'master' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
code_quality: | |
name: 'Code Quality📦' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: npm install | |
- name: Run ESLint | |
run: npm run lint | |
builder: | |
name: 'Build Docker Image🔨' | |
runs-on: ubuntu-latest | |
needs: [code_quality] | |
strategy: | |
matrix: | |
config: | |
- { dockerfile: "Dockerfile", platforms: "linux/amd64,linux/arm64" } | |
steps: | |
- name: Check repo | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Get Commit Hash | |
id: commit | |
shell: bash | |
run: | | |
echo "SHORT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV | |
- name: Build Docker image | |
if: startsWith(github.ref, 'refs/tags/') != true && success() | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: false | |
platforms: ${{ matrix.config.platforms }} | |
tags: "ghcr.io/${{ secrets.NAMESPACE }}/${{ secrets.IMAGE_NAME }}:${{ env.SHORT_HASH }}" | |
file: ${{ matrix.config.dockerfile }} |