Skip to content

debug

debug #115

Workflow file for this run

name: Test Actions
on: push
jobs:
Get-Paths:
runs-on: ubuntu-latest
outputs:
frontend-changed: ${{ steps.changes.outputs.frontend }}
frontend-new-files: ${{ steps.changed-files.outputs.added_files }}
backend-changed: ${{ steps.changes.outputs.backend }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
# include all paths that affect jobs relating to each project
common: &common
- './.github/workflows/test.yaml'
frontend:
- *common
- 'frontend/**'
- './frontend.json'
backend:
- *common
- 'backend/**'
- './backend.json'
list-files: "shell"
- run: echo "${{ github.sha }}"
- run: echo "${{ github.event.pull_request.base.sha }}"
- name: Dump GitHub context
run: echo "${{ toJSON(github) }}"
- name: Get paths to changed frontend files
if: steps.changes.outputs.frontend == 'true'
id: changed-files
uses: tj-actions/changed-files@v32
with:
since_last_remote_commit: true
files: |
frontend/src/**
Test-Backend:
runs-on: ubuntu-latest
needs: Get-Paths
if: needs.Get-Paths.outputs.backend-changed == 'true'
steps:
- run: echo backend
Test-Frontend:
runs-on: ubuntu-latest
needs: Get-Paths
if: needs.Get-Paths.outputs.frontend-changed == 'true'
steps:
- run: echo "${{ needs.Get-Paths.outputs.frontend-new-files }}"