Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

fix: setup pnpm

fix: setup pnpm #246

Workflow file for this run

# Copyright 2023 Hazmi35 (https://github.com/Hazmi35)
name: Services Nightly Builds
on:
push:
branches:
- main
paths:
- "Dockerfile"
- "*/**"
pull_request:
branches:
- main
paths:
- "Dockerfile"
jobs:
build:
runs-on: ubuntu-latest
outputs:
folders: ${{ steps.json.outputs.folders }}
steps:
- name: Check Out Repo
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-depth: 2
- name: List changed folders
id: changed
run: |
echo ::set-output name=folders::$(git diff --name-only HEAD~1 HEAD | grep -E 'services/.*' | cut -d'/' -f2 | sort | uniq | tr '\n' ',' | sed 's/,$//')
- name: List all folders if no changes
if: steps.changed.outputs.folders == ''
id: all
run: |
echo ::set-output name=folders::$(ls services | tr '\n' ',' | sed 's/,$//')
- name: Turn output into JSON array
id: json
run: |
echo ::set-output name=folders::[$(echo ${{ steps.changed.outputs.folders || steps.all.outputs.folders }} | sed 's/,/","/g;s/^/"/;s/$/"/')]
docker:
needs: build
uses: ./.github/workflows/docker.yml
with:
scope: ${{ needs.build.outputs.folders }}
secrets: inherit