Skip to content

Commit

Permalink
Merge pull request #51 from lewagon/release/v1.1.1.rc
Browse files Browse the repository at this point in the history
Release/v1.1.1
  • Loading branch information
matiasalbarello authored Sep 18, 2021
2 parents 970a017 + 34ca0d8 commit 6e2c69e
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 16 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,21 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1.81.0
with:
ruby-version: 2.7 # Not needed with a .ruby-version file

- uses: actions/setup-ruby@v1
- name: Cache Ruby Gems
uses: actions/cache@v2
with:
ruby-version: '2.7'
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: ${{ runner.os }}-gems-

- name: Install dependencies
run: bundle install
- name: Bundle Install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Run tests
run: cd app && bundle exec rspec
43 changes: 32 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,38 @@ inputs:
default: true

runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.allowed-conclusions }}
- ${{ inputs.check-name }}
- ${{ inputs.check-regexp }}
- ${{ inputs.ref }}
- ${{ inputs.repo-token }}
- ${{ inputs.verbose }}
- ${{ inputs.wait-interval }}
- ${{ inputs.running-workflow-name }}
using: "composite"
steps:
- uses: ruby/setup-ruby@v1.81.0
with:
ruby-version: 2.7 # Not needed with a .ruby-version file

- name: Cache Ruby Gems
uses: actions/cache@v2
with:
path: ${{ github.action_path }}
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: ${{ runner.os }}-gems-

- name: Bundle Install
run: |
bundle install --jobs 4 --retry 3
working-directory: ${{ github.action_path }}
shell: bash

- run: |
ruby entrypoint.rb
working-directory: ${{ github.action_path }}
shell: bash
env:
ALLOWED_CONCLUSIONS: ${{ inputs.allowed-conclusions }}
CHECK_NAME: ${{ inputs.check-name }}
CHECK_REGEXP: ${{ inputs.check-regexp }}
REF: ${{ inputs.ref }}
REPO_TOKEN: ${{ inputs.repo-token }}
VERBOSE: ${{ inputs.verbose }}
WAIT_INTERVAL: ${{ inputs.wait-interval }}
RUNNING_WORKFLOW_NAME: ${{ inputs.running-workflow-name }}
branding:
icon: "check-circle"
color: "green"
9 changes: 8 additions & 1 deletion entrypoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
require_relative "./app/services/github_checks_verifier"
require "octokit"

allowed_conclusions, check_name, check_regexp, ref, token, verbose, wait, workflow_name = ARGV
allowed_conclusions = ENV["ALLOWED_CONCLUSIONS"]
check_name = ENV["CHECK_NAME"]
check_regexp = ENV["CHECK_REGEXP"]
ref = ENV["REF"]
token = ENV["REPO_TOKEN"]
verbose = ENV["VERBOSE"]
wait = ENV["WAIT_INTERVAL"]
workflow_name = ENV["RUNNING_WORKFLOW_NAME"]

GithubChecksVerifier.configure do |config|
config.allowed_conclusions = allowed_conclusions.split(",").map(&:strip)
Expand Down

0 comments on commit 6e2c69e

Please sign in to comment.