Publish container to GHCR #3
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: Publish to GHCR | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
publish: | ||
permissions: | ||
packages: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
- name: Install pnpm | ||
run: npm install -g pnpm | ||
with: | ||
Check failure on line 23 in .github/workflows/publish-ghcr.yaml GitHub Actions / Publish to GHCRInvalid workflow file
|
||
version: 9 | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Build | ||
run: pnpm run build | ||
- name: Publish to GHCR | ||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin | ||
- run: docker build -t ghcr.io/${{ github.repository }}:latest . | ||
- run: docker push ghcr.io/${{ github.repository }}:latest |