Skip to content

loop through list of files #25952

Answered by weide-zhou
Vortetty asked this question in Actions
Discussion options

You must be logged in to vote

Hi @vortetty ,

action ‘gha-utilities/sass-build’ has defined inputs ‘source’ and ‘destination’, you can use matrix value for them.

Code sample as below:

jobs:
  loopcheck:
    strategy:
      matrix:
        scssfiles: [fileone,file2]
    runs-on: [ubuntu-latest]
    steps:
      - name: test
        run: |
          echo ${{ matrix.scssfiles }}.scss
      - uses: actions/checkout@v1
      - name: Compile .css from .scss
        uses: gha-utilities/sass-build@v0.1.6
        with:
          source: scss/${{ matrix.scssfiles }}.scss
          destination: css/${{ matrix.scssfiles }}.css

It will complie the two scss files seperately into css folder. Hope it helps.

Replies: 8 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants