i am working on building and deploying artefact based on changed files in Github commit.
i am able to get changed files in latest commit in a json file and format is like below
common/modules/module1/one.txt
common/modules/module2/one.txt
common/modules/module1/api/two.txt
I am using GitHub Actions and want to extract list of modules which were changed in last commit, so in this case module1 and module2 should be my output.
modules name can be anything but the pattern would be /modules/ in file.
how can i extract these using shell ?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…