# Checkout action - checkout current branch

**URL:** <https://forum.gitea.com/t/checkout-action-checkout-current-branch/10393>\
**Category:** Actions\
**Created:** [January 9, 2025, 4:38pm UTC](https://forum.gitea.com/t/checkout-action-checkout-current-branch/10393 "2025-01-09T16:38:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wattsc90](https://avatars.discourse-cdn.com/v4/letter/w/8baadc/32.png) [@wattsc90](https://forum.gitea.com/u/wattsc90)\
**Post date:** [January 9, 2025, 4:38pm UTC](https://forum.gitea.com/t/checkout-action-checkout-current-branch/10393/1 "2025-01-09T16:38:59Z")

</div>

Hi,  
Apologies if this has been queried already but is there an argument/property value e.g.: `${{ github.repository }}` for current branch? I am evaluating using actions and while i can piece together how i build etc. With regards to the checkout action, how does it get configured to “checkout the current branch”?  
I see this arg in the docs, but is there a `${{gitea.currentbranch}}` prop? (also assume all the mentions of github in the readme should be gitea?)

```auto
    # The branch, tag or SHA to checkout. When checking out the repository that
    # triggered a workflow, this defaults to the reference or SHA for that event.
    # Otherwise, uses the default branch.
    ref: ''

```

---

<div class="post-metadata">

**Author:** ![phkrl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/phkrl/32/6028_2.png) [@phkrl](https://forum.gitea.com/u/phkrl)\
**Post date:** [January 9, 2025, 7:05pm UTC](https://forum.gitea.com/t/checkout-action-checkout-current-branch/10393/2 "2025-01-09T19:05:49Z")

</div>

gitea.ref\_name  
It is either branch or tag depending on the value of gitea.ref\_type  
In gitea, github and gitea contexts are the same. If you want to check full structure, you can write one-time job and dump each context as json to study their structure later

---

<div class="post-metadata">

**Author:** ![wattsc90](https://avatars.discourse-cdn.com/v4/letter/w/8baadc/32.png) [@wattsc90](https://forum.gitea.com/u/wattsc90)\
**Post date:** [January 10, 2025, 9:26am UTC](https://forum.gitea.com/t/checkout-action-checkout-current-branch/10393/3 "2025-01-10T09:26:14Z")

</div>

thanks for this! how does one dump the context? that seems highly useful! i was searching for documentation on what that context is/what properties are available but either my google fu is off these days or it just isnt there

---

<div class="post-metadata">

**Author:** ![phkrl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/phkrl/32/6028_2.png) [@phkrl](https://forum.gitea.com/u/phkrl)\
**Post date:** [January 10, 2025, 4:22pm UTC](https://forum.gitea.com/t/checkout-action-checkout-current-branch/10393/4 "2025-01-10T16:22:46Z")

</div>

A lot of info is available in [Accessing contextual information about workflow runs - GitHub Docs](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs)  
To dump context, use [Evaluate expressions in workflows and actions - GitHub Docs](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#tojson) to represent it as string and save it in a file sowhere where it will persist after job finish
