Skip to content
log-in

GitHub Action

Atlassian Jira Login

v1.0.0 Latest version

Atlassian Jira Login

log-in

Atlassian Jira Login

Attempts a login to Atlassian Jira and stores credentials on disk (drop-in replacement of Atlassian action).

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Atlassian Jira Login

uses: frieder/[email protected]

Learn more about this action in frieder/gha-jira-login

Choose a version

Github Action - Jira Login

Build Status Open Issues Sonar Issues Known Vulnerabilities

A Github action that takes access credentials and verifies them again Jira REST API. Upon successful login, the credentials are stored locally in ~/jira/config.yml. This behavior is in line with how atlassian/gajira-login works to act as a drop-in replacement.

Atlassian does not maintain its Github actions anymore. This is an issue since they are built with Node v16, which has been marked deprecated by Github and will soon get removed.

Instead of just writing the data to the file, it performs a login attempt to verify the provided credentials. This allows to fail early if the credentials are incorrect.

Usage

name: Test Action

on:
  [..]

env:
  JIRA_BASE_URL: ${{ secrets.JIRA_URL }} # https://???.atlassian.net
  JIRA_USER_EMAIL: ${{ secrets.JIRA_EMAIL }}
  JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}

jobs:
  example:
    runs-on: ubuntu-latest
    steps:
      - name: Jira Login
        uses: frieder/gha-jira-login@v1
        with:
          baseUrl: ${{ secrets.JIRA_URL }}
          email: ${{ secrets.JIRA_EMAIL }}
          token: ${{ secrets.JIRA_TOKEN }}

The access information can be provided either as direct action arguments or by setting env variables. For the env variable names it will use the same names as Atlassian's login action does to allow for a drop-in replacement. When both are provided, the input fields take precedence over the env variables.

Build Code

Install packages: npm i
Compile code: npm run build
Format code: npm run format
Format check: npm run format-check
Code check: npm run lint

Test Action

This action can be tested during development with the use of https://github.com/nektos/act.

act -j check -s JIRA_URL=*** -s JIRA_EMAIL=*** -s JIRA_TOKEN=***