Code Monkey home page Code Monkey logo

Comments (9)

adriaandotcom avatar adriaandotcom commented on July 1, 2024 1

You're quick! Just tested, same issue. Removing the branch option does not change anything.

from prettier_action.

creyD avatar creyD commented on July 1, 2024 1

Can you try it with:

with:
    ref: ${{ github.head_ref }}

from prettier_action.

creyD avatar creyD commented on July 1, 2024 1

Very cool!

from prettier_action.

creyD avatar creyD commented on July 1, 2024

With version 3 of the prettier action, we depreciated the branch parameter. Can you try without it real quick? It shouldn't change anything, but just to be safe?

from prettier_action.

creyD avatar creyD commented on July 1, 2024

As this probably is a problem with the checkout action, could you please share the config of that?

from prettier_action.

adriaandotcom avatar adriaandotcom commented on July 1, 2024

That config if very simple:

- uses: actions/checkout@v2

from prettier_action.

adriaandotcom avatar adriaandotcom commented on July 1, 2024

That indeed solves the issue!

from prettier_action.

koppor avatar koppor commented on July 1, 2024

Same issue here. The solution does work if not on a pull request (the variable github.head_ref is only available at pulls - see https://docs.github.com/en/actions/learn-github-actions/contexts#github-context).

Workaround:

      - name: Checkout source (PR)
        if: github.event_name == 'pull_request'
        uses: actions/checkout@v4
        with:
          ref: ${{ github.head_ref }}
          show-progress: 'false'
      - name: Checkout source (no-PR)
        if: github.event_name != 'pull_request'
        uses: actions/checkout@v4
        with:
          show-progress: 'false'

This does not solve the permission-denied issue, but might be better than nothing ^^.

 remote: Permission to koppor/jabref.git denied to github-actions[bot].

Not working workaround:

      - name: Checkout source
        uses: actions/checkout@v4
        with:
          submodules: 'true'
          show-progress: 'false'
      - name: Get branch name
        id: branch-name
        uses: tj-actions/branch-names@v7
      - run: git checkout ${{ steps.branch-name.outputs.current_branch }}

This fails, when PR comes from another repository

from prettier_action.

koppor avatar koppor commented on July 1, 2024

Note that I asked for "good" rights of GH_TOKEN at https://github.com/orgs/community/discussions/75867.

from prettier_action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.