Comments (15)
Can you point me to the action definition you're using? Or if its private repo copy it here? It sounds like the output of the git log is getting run as a command.
from changelog-generator.
@datapolitical can you provide your action? to me it looks like you're using the output as a step (which, obviously, will run them as if they're commands)
from changelog-generator.
I think I found this. In my examples I just "echo" the action output. Which you are correct, contains backticks so that the sha's render in monospace in the markdown. So when you echo this output in bash it tries to execute the backticks.
If you need to "echo" this you can use this instead:
- name: Get the changelog
run: |
cat << "EOF"
${{ steps.changelog.outputs.changelog }}
EOF
Otherwise you can use it in other actions like I do to fill out say the GitHub Release Notes.
changelog-generator/.github/workflows/release.yml
Lines 20 to 30 in 44ef091
Please reopen this issue if this doesn't solve your issue.
from changelog-generator.
That makes sense. What I’m trying to do is follow your example here: #41
to reverse the output and remove lines that include “gh-pages”.
so I don’t need to output it specifically, I need to pipe it to
| sed -n '/gh-pages/!p' | tac
And then export that so I can use it in another step.
from changelog-generator.
Also I don’t see an option to re-open the issue…
from changelog-generator.
- name: Get the changelog
run: |
cat << "EOF" | sed -n '/gh-pages/!p' | tac
${{ steps.changelog.outputs.changelog }}
EOF
This should work. Here is an example I tested locally.
cat << "EOF" | sed -n '/gh-pages/!p' | tac
`hi`
`something` gh-pages
`cool`
EOF
`cool`
`hi`
from changelog-generator.
OK I've got that working, but how do I pipe that to an output so I can use it in a later step?
from changelog-generator.
At the moment I'm trying this:
run: |
LOG=$(cat << "EOF" | sed -n '/gh-pages/!p' | tac
${{ steps.changelog.outputs.changelog }}
EOF
)
echo "::set-output name=changelog_final::$LOG"
id: parsedlog
from changelog-generator.
Stay tuned. Its not working for me either and I am pretty sure it should. Ticket into GitHub Support.
from changelog-generator.
So I was able to get this to work kind of:
 - name: Get the changelog
id: parsedlog
run: |
echo ::set-output name=changelog_final::$(cat << "EOF" | sed -n '/gh-pages/!p' | tac
${{ steps.changelog.outputs.changelog }}
EOF
)
- name: Test Release Notes
run: |
echo "Release notes: ${{ steps.parsedlog.outputs.changelog_final}} "
Problem is that the output looks like this:
Release notes: Gemfile Gemfile.lock Pipfile README.md _config.yml _config_dev.yml _data _plugins _posts android-chrome-192x192.png android-chrome-512x512.png apple-touch-icon-precomposed.png apple-touch-icon.png archive.html assets build crosswords.md diet.md drinks favicon.ico grady.md index.md manifest.json newsearch.md package.json posts.html recipes requirements.txt service-worker.js staticman.yml vendor [`a118319`](http://github.com/datapolitical/chrisfnicholson.github.io/commit/a118319b1e2988c4cc94b74da8b7c3d8b072b56e) - one more try
For some reason it's printing a list of all the files in the top level directory.
from changelog-generator.
I get this too. Its wild... Still waiting for support.
from changelog-generator.
It's the * before each line.
It doesn't show up in the output . I bet it's parsing it as "cat *", which for some reason is giving us the list of files rather than their contents.
from changelog-generator.
Ok this was wild. So this all started with backticks... and that should have tipped me off to suddenly all the files are showing up. Why? Globs. The *
at the front of the markdown to indicate an list item. echo expands it. So I used noglob for a bit. Then said forget it. I took out all the markdown markup that will mess with a shell.
But that wasn't all. That fixed most of it. But what happened then was that the newlines between entries were getting eaten. An hour of messing around later and I find out that outputs in Actions don't support multiple lines but there is a work around. So I updated the readme to include an example that should work.
changelog-generator/.github/workflows/changelog.yml
Lines 23 to 39 in 4a06273
from changelog-generator.
Because the output of the action has changed I went ahead an cut a new major release. I don't think anyone relied on stars or backticks... but just in case. This should resolve #93.
from changelog-generator.
This worked great, thank you.
from changelog-generator.
Related Issues (20)
- Use npm version scripts to bump version numbers
- action will get error if there is no previous tag exists
- Could not Generate Changelog HOT 3
- Changelog fails on run HOT 3
- Node version is deprecated warning HOT 2
- [Recommendation]: Option to skip commit HOT 2
- Support '/' in branch names HOT 6
- [error]Not Found HOT 7
- Node version is deprecated
- Commit hash as "view commit" link HOT 4
- same error as issue #20 in version v0.4.4 HOT 3
- changelog in reverse order? HOT 1
- Add an ability to add the changes in the submodules to the changelog HOT 1
- Error returned with exit code 128 HOT 7
- Permission error HOT 4
- no commit hash url text HOT 5
- insufficient permission for adding an object to repository database .git/objects HOT 1
- github release creates a tag on publish HOT 2
- Override git log command HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from changelog-generator.