Skip to content

Specify branch name #29

@onilton

Description

@onilton

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions