Skip to content

Commit

Permalink
feat: allow for the installation of plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
rdaniels6813 committed Jul 7, 2020
1 parent 3c8670e commit d2d458f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
FROM node:lts-alpine
RUN apk update && apk add git
RUN npm install -g semantic-release@17.0.7 \
RUN npm install -g semantic-release@17.1.1 \
@semantic-release/commit-analyzer@8.0.1 \
@semantic-release/release-notes-generator@9.0.1 \
@semantic-release/github@7.0.5 \
@semantic-release/github@7.0.7 \
@semantic-release/npm@7.0.5 \
@semantic-release/exec@5.0.0 \
@semantic-release/changelog@5.0.1 \
@semantic-release/git@9.0.0 \
@semantic-release/gitlab@6.0.4
RUN apk add --update make \
&& rm -rf /var/cache/apk/*
&& rm -rf /var/cache/apk/*
COPY *.sh /
RUN chmod +x /main.sh /setup.sh
9 changes: 7 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ inputs:
description: 'Github token for pushing releases'
required: true
default: ''
plugins:
description: 'Space separated semantic-release plugins to install'
required: false
default: ''
runs:
using: 'docker'
image: docker://rdaniels6813/semantic-release-alpine
args:
- semantic-release
pre-entrypoint: 'setup.sh'
entrypoint: 'main.sh'
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
PLUGINS: ${{ inputs.plugins }}
2 changes: 2 additions & 0 deletions main.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#! /bin/sh
semantic-release
13 changes: 13 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#! /bin/sh
if [ ".npmrc" ]; then
cp .npmrc ~/
fi
if [ "$PLUGINS" != "" ]; then
npm install --ignore-scripts -g $PLUGINS
fi
if [ "~/.npmrc" ]; then
rm ~/.npmrc
fi
if [ "$PLUGINS" != "" ]; then
npm rebuild -g $PLUGINS
fi

0 comments on commit d2d458f

Please sign in to comment.