Skip to content

nclsbayona/nclsbayona-readme-action

Repository files navigation

nclsbayona-readme-action

Contents

  1. What this action does?

    This action builds a file (I use it for my profile README but it's not limited to that) for you using some APIs and also some information about you.

    What information does this action support?

    This action supports:
    • python-version: required: false description: 'Python version to use to run the file' default: '3.10'
    • drink-format: required: false default: 'html' description: 'The format to output drink instructions (string|html|json|csv)'
    • wakatime-format: required: false default: 'html' description: 'The format to output wakatime information (string|html|json|csv)'
    • wakatime-api-key: required: false default: '' description: 'Wakatime API Key to display information about time on PC. Not adding a value to this input disables the lookup of info on Wakatime servers'
    • nasa-api-key: required: false default: '' description: 'Nasa API Key to display a photo of the universe. Not adding a value to this input disables the lookup of info on Nasa servers'
    • file-path: required: false default: 'README.md' description: 'File path of the file we want to generate'
    • template-file-path: required: false default: 'render_templates/main_template_file' description: 'File path of the template we use to generate the file'
    • github-username: required: true description: 'Github username of the user running the action'
    • telegram-username: required: false default: '' description: 'Telegram username of the user running the action'
    • twitter-username: required: false default: '' description: 'Twitter username of the user running the action'
    • linkedin-username: required: false default: '' description: 'LinkedIn username of the user running the action'
    • webpage-url: required: false default: '' description: 'The url to the user webpage'
    • webpage-qr: required: false default: '' description: 'A QR to the user webpage'
    • contributions-url: required: true description: 'URL to a grid an image of user contributions'
    • remove-old-readme: required: false description: 'Whether or not this action should delete the old README' default: true


  2. How was this action built?

    This action was built using python. The idea is that you can use this action in your profile README so it captures people's attention when they see it.

    Why is this action a composite action?

    This action is a composite action because I wanted to learn more about them. I understand that It might have been easier to use containers for this since the environment is always the same but the generated file would also be in the container and I didn't wanted to upload and then download that file or to mount a volume to share that file with the runner so people could use the generated file the way they wanted (Upload it to a remote server, store it in the repository, upload as an artifact to use it somewhere else ...). So I found it useful to keep this action as a composite action. Anyways, if you want to develop this action using containers feel free to do it (I have to admit I created two other versions that use containers, you can check them at the different branches of this repo!).

    What steps does this action follow?

    This action does the following steps:
    1. Download required files (main.py , requirements.txt and a directory containing the render templates for the file that is going to be generated)
    2. Remove the old README file
    3. Setup Python in the runner
    4. Install the required dependencies
    5. Generate the file using the main.py
    6. Delete the downloaded files


  3. How can I use this action?

    To use this action you can include in your workflow file a step that uses this action, defining the variables you want to. Here's an example

Contributors

nclsbayona
nclsbayona
semantic-release-bot
semantic-release-bot

Bots

dependabot[bot]
dependabot[bot]
github-actions[bot]
github-actions[bot]

About

README Update action

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages