Skip to content

A github action to create a file in your github workflow.

License

Notifications You must be signed in to change notification settings

1arp/create-a-file-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create A File

action to create a file in the actions workflow

path

with:
    path: value

Path where you want to create the file relative to the cwd (default: root of your repository)

isAbsolutePath ( optional )

with:
    isAbsolutePath: boolean

If the path provided is an absolute path (default: false)

file

with:
    file: value

Name of the file with extention

content

with:
    content: value

Content of the file (default: empty)

Example Usage

An example of a workflow for some documentation.

name: Create A File
# This workflow is triggered on pushes to the repository.
on:
  push:
    branches:
      - master

jobs:
  createFile:
    name: Create A File
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: 1arp/[email protected]
        with:
          path: 'src'
          isAbsolutePath: false
          file: 'foo.bar'
          content: |
            Hello
            World