Skip to content

Execute command for changed flles in folder on push #1776

Answered by jackton1
agenceKanvas asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @agenceKanvas, based on your provided GitHub Actions workflow, here are some modifications you can make to achieve your desired outcome:

  • Use tj-actions/changed-files action to get the list of changed files restricted to only folder1, folder2, and folder3.
  • Iterate over the changed files and run the staticrypt command only for the files in the specified folders.
  • Commit the changes and push them to the main branch.

Here's an updated version of your workflow:

name: Staticrypt

on:
  push:
    branches:
      - main

jobs:
  changed_files:
    runs-on: ubuntu-latest
    name: Test changed-files
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@agenceKanvas
Comment options

@agenceKanvas
Comment options

@agenceKanvas
Comment options

@jackton1
Comment options

Answer selected by jackton1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants