chore(deps): update bjerkio/workflows action to v2 #22
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: Build | |
on: [pull_request] | |
jobs: | |
typical-workflow: | |
name: Workflow | |
uses: bjerkio/workflows/.github/workflows/pnpm-typical.yml@v2 | |
build-container: | |
name: Build container | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
strategy: | |
matrix: | |
# One build for each app | |
app: | |
- name: server | |
container-file: ./packages/server/Dockerfile | |
cache-from: type=gha | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ matrix.app.name }} | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
- name: Log in to the Container registry 🔑 | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker meta 🏷 | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | |
${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }} | |
- name: Set up Docker Buildx 🔨 | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and Push Container 🛠 | |
id: build-and-push | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./ | |
file: ${{ matrix.app.container-file }} | |
push: false | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: ${{ matrix.app.cache-from }} | |
cache-to: type=gha,mode=max |