From 4c208665597a72f748c1be0979e8d65fa00000fd Mon Sep 17 00:00:00 2001 From: Brandon Dunne Date: Fri, 17 Dec 2021 14:15:02 -0500 Subject: [PATCH] Initial attempt at Github Actions --- .github/workflows/ci.yaml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..f7d619b9 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -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 }}