-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #235 from bdunne/initial_github_actions
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ruby-version: | ||
- '2.6' | ||
- '2.7' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true | ||
- name: Run tests | ||
run: bundle exec rake | ||
build: | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up environment | ||
run: | | ||
echo "TRAVIS_PULL_REQUEST=${{ github.base_ref == '' && 'false' || 'true' }}" >> $GITHUB_ENV | ||
- name: Set up registry credentials | ||
if: ${{ github.base_ref == '' }} | ||
run: | | ||
echo "REGISTRY_PASSWORD=${{ secrets.REGISTRY_PASSWORD }}" >> $GITHUB_ENV | ||
echo "REGISTRY_USERNAME=${{ secrets.REGISTRY_USERNAME }}" >> $GITHUB_ENV | ||
- name: Run container build script | ||
run: bin/build_container_image | ||
env: | ||
TRAVIS_BRANCH: ${{ env.GITHUB_REF_NAME }} |