trsvchn / colab-badge-action Goto Github PK
View Code? Open in Web Editor NEWOrganize your jupyter notebooks with "Open in Colab" badges
License: MIT License
Organize your jupyter notebooks with "Open in Colab" badges
License: MIT License
Error: Unable to process command '::set-env name=MODIFIED_NOTEBOOKS::' successfully.
Error: The `set-env` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
Hi,
Finally i found a solution to what i'm looking for after many days.
But couldn't quite understand how this works.
Can you please make a small tutorial or steps how to install and use the 'colab-badge-action'.
Appreciate your help.
Thank you.
The pull_request
workflow event uses a different value for GITHUB_REF
that does not include the branch name (in contrast to the push
event); instead, it includes information about the PR, e.g. refs/pull/72/merge
. This causes git push
to fail with errors like this:
! [remote rejected] HEAD -> refs/pull/72/merge (deny updating a hidden ref)
Add checks for returncodes of subprocess calls for committing and pushing funs. Since, currently, action doesn't catch git-related errors.
Related to #3
Hello!
It seems that with the default settings, pasted below I am getting an error where the branch name keeps getting switched to master even though I am using the default settings. See image (see below).
Thank you for your help!
Steven
name: Badges workflow
on: [workflow_dispatch, push]
jobs:
build:
name: Badges Job
runs-on: ubuntu-latest
steps:
- name: Checkout first
id: checkout
uses: actions/checkout@v2
- name: Add/Update badges
id: badges
uses: trsvchn/colab-badge-action@v4
with:
check: 'all'
update: true
verbose: true
- name: push
uses: actions-x/commit@v6
with:
message: Update Colab badges with GitHub Actions
When this action adds a commit to a PR for merging into master
, this commit is not triggering CI actions that are normally triggered by push
and pull_request
events that touch master
. Any ideas?
Test Pull Request event from a fork
Looks like action doesn't handle the case where file name includes white spaces. e.g. My notebook.ipynb
What we want to achieve is this
jobs:
build:
steps:
- name: Checkout Action
uses: actions/checkout@v2
- name: Colab Badge Action
# Add/update colab badges (modify files)
uses: trsvchn/colab-badge-action@new_version
with:
...
- name: Commit and Push Changed Notebooks
# Use your favorite action here
uses: action@commit
with:
...
Colab badges in Jupyter Notebooks update across branches when merging or pushing, but Colab badges in Markdown files do not update. They will be created just fine, but not updated once created.
git checkout -b test
test
at the root of the repository{{ badge }}
.{{ badge test }}
git commit -am "test"
git push -u origin test
test
test
branch to the main
branch.Note: You can inspect the action since the yaml below creates verbose output and see that
Goes in .github/workflows/colab_badge.yml
name: Badges workflow
on: [push]
jobs:
build:
name: Badges Job
runs-on: ubuntu-latest
steps:
- name: Checkout first
id: checkout
uses: actions/checkout@v2
- name: Add/Update badges
id: badges
uses: trsvchn/colab-badge-action@v4
with:
check: 'all'
update: true
verbose: true
- name: push
uses: actions-x/commit@v6
with:
message: Update Colab badges with GitHub Actions
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.