Skip to content
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

v3 is failing for the same CI #660

Closed
tarunmangukiya opened this issue Dec 10, 2020 · 4 comments
Closed

v3 is failing for the same CI #660

tarunmangukiya opened this issue Dec 10, 2020 · 4 comments

Comments

@tarunmangukiya
Copy link

Subject of the issue

I am receiving the error: When the repository is checked out on a commit instead of a branch, the 'base' input must be supplied.

It was working perfect like 2 months back with v1, but now I am seeing it failing for v1 as well as v3.

Steps to reproduce

You can check the logs at: https://github.com/Iconscout/unicons/pull/118/checks?check_run_id=1528930610

@peter-evans
Copy link
Owner

Hi @tarunmangukiya

As the message explains, you need to provide the base input because you are checked out on the pull request merge commit, which is not a branch. What is the intended base of your pull request?

You are running the action on pull_request and on push to master. Is that intentional? Please explain to me when you want to create a pull request and what the base of the pull request should be. I might be able to help you further with that information.

@tarunmangukiya
Copy link
Author

What We are doing is that, whenever someone pushes to the PR, I want to make sure that some of the resources are up to date with our API gateway. If they are not then create a PR with updated resources which we can simply merge.

This helps us to keep the workflow smooth.

For example,
Unicons is an icon library, and those are uploaded to Iconscout. We pull them when someone pushes to the PR.

@peter-evans
Copy link
Owner

Try this:

jobs:
  update-icons:
    runs-on: ubuntu-latest
    steps:
-     - uses: actions/checkout@v1
+     - if: github.event_name == 'push' 
+       uses: actions/checkout@v2
+     - if: github.event_name == 'pull_request' 
+       uses: actions/checkout@v2
+       with:
+         ref: ${{ github.head_ref }}
      - uses: actions/setup-node@v1
        with:
          node-version: 10.16.3
      - name: Download Line Icons
        run: npm ci --progress=false && npm run line:download
        env:
          API_DOWNLOAD_LINE: ${{ secrets.API_DOWNLOAD_LINE }}
          STYLE: line
          CSS_PREFIX: uil
      - name: Download Solid Icons
        run: npm run line:download
        env:
          API_DOWNLOAD_SOLID: ${{ secrets.API_DOWNLOAD_SOLID }}
          STYLE: solid
          CSS_PREFIX: uis
      - name: Download Monochrome Icons
        run: npm run monochrome:download
        env:
          API_DOWNLOAD_MONOCHROME: ${{ secrets.API_DOWNLOAD_MONOCHROME }}
      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v3
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          title: Updated Icons

@tarunmangukiya
Copy link
Author

This is working good for PRs I think. I'll ping if there's any issue.

rickstaa added a commit to rickstaa/stable-learning-control that referenced this issue Jan 9, 2021
This commit fixes a bug in the code_quality_ci action which caused any
pull requests created by the action to fail if a commit was pushed to
the pull request (see
peter-evans/create-pull-request#660 for more
info).
rickstaa added a commit to rickstaa/stable-learning-control that referenced this issue Jan 9, 2021
* 🐛 Fixes mac github action name

* 🎨 Improves gh-action code formatting

* 💚 Fixes pull request codeQuality gh action

This commit fixes a bug in the code_quality_ci action which caused any
pull requests created by the action to fail if a commit was pushed to
the pull request (see
peter-evans/create-pull-request#660 for more
info).

* 💚 Updates changelog-build action config file
rickstaa added a commit to rickstaa/stable-learning-control that referenced this issue Jan 9, 2021
* 🎨 Improves gh-action code formatting

* 💚 Fixes pull request codeQuality gh action

This commit fixes a bug in the code_quality_ci action which caused any
pull requests created by the action to fail if a commit was pushed to
the pull request (see
peter-evans/create-pull-request#660 for more
info).

* 💚 Updates changelog-build action config file

* 💚 Fixes release gh action branch name
rickstaa added a commit to rickstaa/stable-learning-control that referenced this issue Jan 9, 2021
* 🎨 Improves gh-action code formatting

* 💚 Fixes pull request codeQuality gh action

This commit fixes a bug in the code_quality_ci action which caused any
pull requests created by the action to fail if a commit was pushed to
the pull request (see
peter-evans/create-pull-request#660 for more
info).

* 💚 Updates changelog-build action config file

* 💚 Fixes release gh action branch name

* 🎨 💚 Fixes release gh-action bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants