Skip to content

MariachiBear/get-repo-name-action

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

Get Repository Name

This action gets the repository name and returns it as an output

Inputs

with-owner

Not Required | Defines if the owner name should be added in the name. | Default "false"

string-case

Not Required | Special case to transform the repository name. | Possible values : ["lowercase", "uppercase", "camelCase","capitalCase", "constantCase", "dotCase", "headerCase", "noCase", "paramCase", "pascalCase", "pathCase", "sentenceCase", "snakeCase"]

The case conversion is made with the change-case npm package.

Outputs

repository-name

The name of the repository.

Example usage

name: Action Example

on:
  push:

jobs:
  build_and_push:
    runs-on: ubuntu-latest

    steps:
      ...
      - name: Get repository name
        id: repo-name
        uses: MariachiBear/get-repo-name-action@v1.1.0
        with:
          with-owner: 'true'
          string-case: 'uppercase'

      - name: Build and Push
        uses: docker/build-push-action@v3
        env:
          REPO_NAME: ${{ steps.repo-name.outputs.repository-name }}
      ...

About

GitHub action to get the repository name of the current workflow. Useful to build information without creating a secret for the name of the own repository

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published