-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The action passes… but nothing is written on the file #2
Comments
Did u solved it? |
@eRouge-ps, please edit your issue to use ```, rather than `, as this will format your multiline code sample properly example:
|
So with YAML formatting matters so given what you have there its hard to debug, if you are still having an issue could you properly format the comment? |
I have currently the same issue. Is it solved? Mine looks like this:
|
Hi all,
|
As the owner said, you need to commit and push the file. If you're not comfortable with running git commands, this action will do it for you: name: Overwrite file
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Overwrite ip.js
uses: "DamianReeves/[email protected]"
with:
path: path/to/file.js
write-mode: overwrite
contents: |
some content you want to change
- name: Commit & Push
uses: Andro999b/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
force: true
message: 'Overwritten by Github Actions - ${date}' |
Hey,
so I’ve managed to make this action work (very basic : go to branch, write something) :
`name: Append File
on:
pull_request:
types: [labeled, unlabeled]
jobs:
build:
name: Append Text
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: writefile
- name: Write File
uses: DamianReeves/[email protected]
with:
path: ${{github.workspace}}/test
contents: |
echo "Hello World!"
write-mode: overwrite`
The action is a success, but the file does not change at all… maybe I need to commit every thing ? I have no clue. If you have an idea I’d love to hear it !
Thanks a lot !
The text was updated successfully, but these errors were encountered: