dagger / dagger-for-github

GitHub Action for Dagger
https://github.com/marketplace/actions/dagger-for-github
Apache License 2.0
120 stars 25 forks source link

feat: add `cmds` input (multiline `args`) #47

Closed joaofnds closed 2 years ago

joaofnds commented 2 years ago

Add an input that allows for multiple dagger commands.

      - name: dagger do test
        uses: dagger/dagger-for-github@v2
        with:
          cmds: |
            project update
            do test

The idea came from a discussion about how to run dagger project update before running other dagger commands within the same action step. Thanks @marcosnils and @crazy-max for the idea and for the comments (:

Here are some examples on how to use this command: using just args: https://github.com/joaofnds/ds/actions/runs/2157832858 using args and cmds: https://github.com/joaofnds/ds/actions/runs/2157832072 using just cmds: https://github.com/joaofnds/ds/actions/runs/2157837793

I tried to make it backward compatible, so when you use args it just prints a warning and prepends args to cmds.

closes: https://github.com/dagger/dagger-for-github/issues/43

codecov-commenter commented 2 years ago

Codecov Report

Merging #47 (86bc231) into main (d1bb14c) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #47   +/-   ##
=======================================
  Coverage   90.00%   90.00%           
=======================================
  Files           2        2           
  Lines          50       50           
  Branches        9        9           
=======================================
  Hits           45       45           
  Misses          3        3           
  Partials        2        2           
Impacted Files Coverage Δ
src/context.ts 76.92% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d1bb14c...86bc231. Read the comment docs.

crazy-max commented 2 years ago

LGTM too but let's wait a bit before merging as we don't want to have a desync README with the current release. Keep you in touch soon.