action.yml 693 B

123456789101112131415161718192021222324252627
  1. name: "Unarchive tar"
  2. description: "Download and unarchive tar into directory"
  3. inputs:
  4. url:
  5. description: "URL of the tar archive"
  6. required: true
  7. path:
  8. description: "Directory to unarchive into"
  9. required: true
  10. type:
  11. description: "Compression type (tar option)"
  12. required: false
  13. default: "J"
  14. strip:
  15. description: "Strip components"
  16. required: false
  17. default: "0"
  18. runs:
  19. using: "composite"
  20. steps:
  21. - name: Unarchive into directory
  22. shell: bash
  23. run: |
  24. mkdir -p ${{ inputs.path }}
  25. cd ${{ inputs.path }}
  26. curl --no-progress-meter ${{ inputs.url }} | tar -${{ inputs.type }}x --strip-components=${{ inputs.strip }}