Publish for linux/arm64 #2
This file contains hidden or 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: Check and Publish | |
| on: | |
| push: | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| type-check: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Use Node.js 24 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Check project TS types validity | |
| run: pnpm run types:check | |
| publish-image: | |
| needs: type-check | |
| if: github.ref == 'refs/heads/master' | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build Docker image | |
| run: | | |
| docker build --platform linux/arm64 -t ghcr.io/${{ github.repository_owner }}/m4xdev:latest . | |
| - name: Push Docker image | |
| run: | | |
| docker push ghcr.io/${{ github.repository_owner }}/m4xdev:latest |