Skip to content

cssnr/create-files-action

Repository files navigation

Actions Tools GitHub Tag Major GitHub Tag Minor GitHub Release Version Workflow Test Workflow Lint Quality Gate Status GitHub Last Commit Codeberg Last Commit GitHub Repo Size GitHub Top Language GitHub Contributors GitHub Discussions GitHub Forks GitHub Repo Stars GitHub Org Stars Discord Ko-fi

Create Files Action

Easily create various file types with custom options. Write the data to a file or use the output.

Inputs

Input Default Input Description
type Required Type of File to Create
file - Output File to Create
data - File Data for type

type

Currently only supports redirect html file.

file

Output file path to write file; otherwise use the output.

data

Type specific data in YAML format.

How to Pass Data
data: |
  url: https://smashedr.github.io/github-projects/
  text: /github-projects
  title: Ralf Broke It
  timer: 5

Outputs

Output Description
content File Content
- name: 'Create Files Action'
  id: files
  uses: cssnr/create-files-action@master

- name: 'Echo Output'
  run: |
    echo "content: '${{ steps.files.outputs.content }}'"

Types

redirect

Creates an HTML redirect page with timer and link.

Data Default Value Description of Input
url - URL to Redirect too
text url Text for URL link
title Redireting Title of the page
timer 5 Redirect timer seconds
View Step Example
- name: 'Redirect'
  id: redirect
  uses: cssnr/create-files-action@master
  with:
    type: 'redirect'
    file: 'index.html'
    data: |
      url: https://smashedr.github.io/github-projects/
      text: /github-projects
      title: Rolf Broke
      timer: 3

robots

Creates a robots.txt to block all robots.

View Step Example
- name: 'Robots'
  id: robots
  uses: cssnr/create-files-action@master
  with:
    type: 'robots'
    file: 'robots.txt'

Examples

💡 Click on an example heading to expand or collapse the example.

Coming soon.

For more examples, you can check out other projects using this action:
https://github.com/cssnr/create-files-action/network/dependents

Support

For general help or to request a feature see:

If you are experiencing an issue/bug or getting unexpected results you can:

For more information, see the CSSNR SUPPORT.md.

Contributing

If you would like to submit a PR, please review the CONTRIBUTING.md.

Please consider making a donation to support the development of this project and additional open source projects.

Ko-fi

Actions Tools

Additionally, you can support other GitHub Actions I have published:

❔ Unpublished Actions

These actions are not published on the Marketplace, but may be useful.


📝 Template Actions

These are basic action templates that I use for creating new actions.

Note: The docker-test-action builds, runs and pushes images to GitHub Container Registry.


For a full list of current projects visit: https://cssnr.github.io/

About

Easily Create Various Files from Templates with Custom Options

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project