-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee92fd2
commit fa48252
Showing
1 changed file
with
66 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,66 @@ | ||
name: Ruby Docker Build | ||
'on': | ||
workflow_dispatch: {} | ||
push: {} | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: '0' | ||
- name: Set up Ruby | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.7' | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_SAMPLES_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_SAMPLES_PASSWORD }} | ||
- name: Install Bundler | ||
run: gem install bundler | ||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: 5.x | ||
- id: determine_version | ||
name: Determine Version | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
additionalArguments: /overrideconfig mode=Mainline | ||
- name: Install Octopus Deploy CLI | ||
uses: OctopusDeploy/install-octopus-cli-action@v1 | ||
with: | ||
version: latest | ||
- name: Install Dependencies | ||
run: bundle install | ||
shell: bash | ||
- name: Test | ||
run: gem install rspec_junit_formatter; rspec --format RspecJunitFormatter --out results.xml | ||
shell: bash | ||
- if: always() | ||
name: Report | ||
uses: dorny/test-reporter@v1 | ||
with: | ||
name: Ruby Tests | ||
path: results.xml | ||
reporter: java-junit | ||
fail-on-error: 'false' | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
tags: octopussamples/randomquotesruby:latest | ||
- name: Create Octopus Release | ||
uses: OctopusDeploy/[email protected] | ||
with: | ||
api_key: ${{ secrets.OCTOPUS_API_TOKEN }} | ||
project: Random Quotes | ||
server: ${{ secrets.OCTOPUS_SERVER_URL }} | ||
deploy_to: Dev | ||
packages: randomquotes:${{ steps.determine_version.outputs.semVer }} |