Skip to content

vidavidorra/github-action-app-user

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

GitHub Action App user

Get a GitHub App's email and username, from a GitHub Action.


Renovate semantic-release Code coverage License

Usage

This GitHub Action can be used in combination with a GitHub Action that creates a GitHub App installation token, for example actions/create-github-app-token. The workflow below shows an example where this GitHub Action is used for the semantic-release author and committer.

name: Release
on:
  push:
    branches:
      - main
jobs:
  release:
    runs-on: ubuntu-latest
    timeout-minutes: 5
    steps:
      - uses: actions/create-github-app-token
        id: app-token
        with:
          app-id: ${{ vars.APP_ID }}
          private-key: ${{ secrets.PRIVATE_KEY }}
      - uses: vidavidorra/github-action-app-user
        id: app-user
        with:
          token: ${{ steps.app-token.outputs.token }}
          slug: ${{ steps.app-token.outputs.app-slug }}
      - name: Release
        env:
          GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
          GIT_AUTHOR_NAME: ${{ steps.app-user.outputs.username }}
          GIT_AUTHOR_EMAIL: ${{ steps.app-user.outputs.email }}
          GIT_COMMITTER_NAME: ${{ steps.app-user.outputs.username }}
          GIT_COMMITTER_EMAIL: ${{ steps.app-user.outputs.email }}
        run: npx --no-install semantic-release

Inputs

name type required description
token string GitHub App installation access token
slug string slug of the GitHub App

Outputs

name type description
email string email of the GitHub App user
username string username of the GitHub App user

Contributing

Please create an issue if you have a bug report or feature proposal, or create a discussion if you have a question. If you like this project, please consider giving it a star ⭐ to support my work.

Refer to the contributing guide for detailed information about other contributions, like pull requests.

Conventional Commits: 1.0.0 XO code style Prettier code style

Security policy

Please refer to the Security Policy on GitHub for the security policy.

License

This project is licensed under the GPLv3 license.

Copyright © 2024 Jeroen de Bruijn

License notice

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

The full text of the license is available in the LICENSE file in this repository and online