actions-playground/.github/workflows/test.yml
2022-08-12 15:07:13 +02:00

46 lines
1.1 KiB
YAML

# This is a basic workflow to help you get started with Actions
name: testing out
on:
push:
branches: [main]
jobs:
install-build:
outputs:
foo-service: ${{ steps.install.outputs.foo-service }}
bar-service: ${{ steps.install.outputs.bar-service }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: install
id: install
run: |
echo pnpm install
node ./gen-service-version.js
foo-service:
needs: [install-build]
runs-on: ubuntu-latest
if: ${{ needs.install-build.outputs.foo-service == 'run' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build
run: |
./foo-service/build.sh
bar-service:
needs: [install-build]
runs-on: ubuntu-latest
if: ${{ needs.install-build.outputs.bar-service == 'run' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build
run: |
./bar-service/build.sh