question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Specify branch name

See original GitHub issue

On scheduled workflow it is not possible to run add-and-commit against a specific branch since it relies on ${GITHUB_REF}.

schedule always use the last commit on default branch.

on:
  schedule:
    - cron: "50 10,17,20,23 * * *"

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        ref: gh-pages # a custom branch

    - name: Commit changes
      uses: EndBug/add-and-commit@v4
      with:
        message: "Updated file"
        add: "file.csv"
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

I tried passing GITHUB_REF: refs/heads/gh-pages in env, but it didn’t work

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
oniltoncommented, May 1, 2020

Cool! Nice work. Thanks! 👏

0reactions
allcontributors[bot]commented, Jul 10, 2020

@EndBug

I’ve put up a pull request to add @onilton! 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I rename a local Git branch? - Stack Overflow
To start, you will need to rename a local branch by following the previous steps. 2.Then delete the old branch and push the...
Read more >
How to rename and change a Git branch name locally &amp
The steps to change a git branch name are: Rename the Git branch locally with the git branch -m new-branch-name command; Push the...
Read more >
Git Rename Branch – How to Change a Local Branch Name
Step 1: Make sure you are in the root directory for your project · Step 2: Go to the branch you want to...
Read more >
How To Rename a Local and Remote Git Branch - Linuxize
Start by switching to the local branch which you want to rename: git checkout <old_name> Copy · Rename the local branch by typing:...
Read more >
How To Change Branch Name on Git - devconnected
In order to change a branch name on Git, you have to use the “git branch” command followed by the “-m” option. Next,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found