Skip to content

Commit

Permalink
Merge pull request #1 from Bearer/experimental
Browse files Browse the repository at this point in the history
Use input to checkout the required version
  • Loading branch information
cfabianski authored May 25, 2022
2 parents 4a2852f + 36f490c commit 73d6296
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
14 changes: 0 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
FROM ubuntu:latest

ARG VERSION=latest

RUN apt-get update && \
apt-get -y install software-properties-common && \
add-apt-repository -y ppa:git-core/ppa && \
apt-get -y install curl unzip git

RUN echo "using version ${VERSION}"

RUN mkdir /app

RUN curl https://bearer-cli-binaries.s3.eu-west-1.amazonaws.com/${VERSION}/bearer-broker_linux_amd64.zip --output /app/bearer.zip

WORKDIR /app

RUN unzip /app/bearer.zip

ADD ./entrypoint.sh /app/entrypoint.sh

RUN chmod u+x -R /app

ENTRYPOINT ["/app/entrypoint.sh" ]
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ branding:
icon: "lock"
color: "blue"
inputs:
version:
description: Version of the binary to download.
default: latest
required: false
github_token:
description: The GitHub token used to create an authenticated client
default: ${{ github.token }}
required: false
runs:
using: "docker"
image: "Dockerfile"
env:
VERSION: ${{ inputs.version }}
10 changes: 9 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/bash
set -e

cd /app/bearer-broker_linux_amd64/
echo "Using version ${VERSION}"

curl https://bearer-cli-binaries.s3.eu-west-1.amazonaws.com/${VERSION}/bearer-broker_linux_amd64.zip --output bearer.zip

unzip bearer.zip

chmod u+x -R bearer-broker_linux_amd64/

cd bearer-broker_linux_amd64/
./broker

0 comments on commit 73d6296

Please sign in to comment.