config: add pnpm to deployment workflow

This commit is contained in:
Manuel
2024-02-03 22:46:21 +01:00
parent 154fc050cd
commit ea7cb27cfa

View File

@@ -1,18 +1,26 @@
name: Docker image name: Docker image
on: on:
push: pull_request:
types:
- closed
branches: branches:
- main - main
workflow_dispatch: {} workflow_dispatch: {}
permissions: permissions:
contents: write contents: write
packages: write
concurrency: production
jobs: jobs:
deploy: deploy:
name: Deploy docker image name: Deploy docker image
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps: steps:
- name: Discord notification - name: Discord notification
env: env:
@@ -21,9 +29,34 @@ jobs:
with: with:
args: 'Deployment of an image has been triggered' args: 'Deployment of an image has been triggered'
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build artifacts
run: pnpm build
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Bump version and push tag - name: Bump version and push tag
uses: anothrNick/github-tag-action@1.64.0 # Don't use @master or @v1 unless you're happy to test the latest version id: githubTagAction
uses: anothrNick/github-tag-action@1.64.0
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: false WITH_V: false
DRY_RUN: true DRY_RUN: true
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest
type=raw,value=${{ steps.githubTagAction.outputs.new_tag }}