Skip to content

Commit

Permalink
[DEVOPS-8] Access to github context
Browse files Browse the repository at this point in the history
  • Loading branch information
theCapypara committed Jan 10, 2022
1 parent a7eb772 commit c1279d9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
23 changes: 20 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,33 @@ inputs:
description: 'Path to package to upload, relative to repository root.'
required: false
default: ''
github-token:
description: The GitHub token used to create an authenticated client
default: ${{ github.token }}
required: false
github-event-name:
description: Github event name. You do not need to set this (just required because github. access isn't possible in the steps.)
default: ${{ github.event_name }}
required: false
github-ref-type:
description: Github ref type. You do not need to set this (just required because github. access isn't possible in the steps.)
default: ${{ github.ref_type }}
required: false
github-ref-name:
description: Github ref name. You do not need to set this (just required because github. access isn't possible in the steps.)
default: ${{ github.ref_name }}
required: false
runs:
using: 'docker'
image: 'Dockerfile'
args:
- /usr/bin/nexus-upload
- --repository=${{ inputs.repository }}
- --username=${{ inputs.username }}
- --password=${{ inputs.password }}
env:
PACKAGE_PATH: ${{ inputs.package-path }}
VERSION: ${{ inputs.version }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_REF_TYPE: ${{ github.ref_type }}
GITHUB_REF_NAME: ${{ github.ref_name }}
GITHUB_EVENT_NAME: ${{ inputs.github-event-name }}
GITHUB_REF_TYPE: ${{ inputs.github-ref-type }}
GITHUB_REF_NAME: ${{ inputs.github-ref-name }}
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/bash
if [[ -z "${VERSION}" ]]; then
if [ "$GITHUB_EVENT_NAME" = "push" ]; then
if [ "$GITHUB_REF_TYPE" = "branch" ]; then
Expand Down

0 comments on commit c1279d9

Please sign in to comment.