Skip to content

testing tj actions to store directory changes in env var #9

testing tj actions to store directory changes in env var

testing tj actions to store directory changes in env var #9

Workflow file for this run

name: Track changes between main and new commit
on:
workflow_dispatch: {}
push:
branches:
- 'ci-specific-modules'
jobs:
changed_files:
# ------------------------------------------------------------------------
# Event `pull_request`: Compare the last commit of the main branch or last
# remote commit of the PR branch -> to the current commit of a PR branch.
# ------------------------------------------------------------------------
runs-on: ubuntu-latest # windows-latest || macos-latest
name: Test changed-files
env:
CHANGED_MODULES: ""
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- name: Get changed files inside action folder
id: changed-files
uses: tj-actions/changed-files@v42
with:
files: .src/action/**
if: steps.changed-files-specific.outputs.any_changed == 'true'
env:
CHANGED_MODULES: action
- name: Get changed files inside interfacing folder
id: changed-files

Check failure on line 34 in .github/workflows/temp_ci_test.yml

View workflow run for this annotation

GitHub Actions / Track changes between main and new commit

Invalid workflow file

The workflow is not valid. .github/workflows/temp_ci_test.yml (Line: 34, Col: 13): The identifier 'changed-files' may not be used more than once within the same scope.
uses: tj-actions/changed-files@v42
with:
files: .src/interfacing/**
if: steps.changed-files-specific.outputs.any_changed == 'true'
env:
CHANGED_MODULES: "$CHANGED_MODULES interfacing"
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed!"
done
echo =======================
echo "CHANGED_MODULES: $CHANGED_MODULES"
# setup-environment:
# name: Setup environment
# runs-on: ubuntu-latest
# outputs:
# registry: ${{ steps.docker-environment.outputs.registry }}
# repository: ${{ steps.docker-environment.outputs.repository }}
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v3
# - name: Setup Watod Environment
# run: ./watod_scripts/watod-setup-env.sh
# shell: bash
# - name: Generate Docker Environment
# id: docker-environment
# uses: "./.github/templates/docker_context"