Skip to content

Commit

Permalink
Merge pull request #436 from HewlettPackard/dockerimage_version
Browse files Browse the repository at this point in the history
Changes for docker image while release versioning
  • Loading branch information
chebroluharika committed Sep 11, 2020
2 parents cbee0b6 + 38f78cd commit 2f2d0e3
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/dockerimage.yml
@@ -0,0 +1,40 @@
name: Docker Image CI

on:
release:
types:
- created
jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
name: Check out code
- name: Set up Ruby 2.6
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6.x
- name: Set Credentials
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: Bearer ${GITHUB_TOKEN}\n:rubygems_api_key: Bearer ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
- name: Publish to RubyGems
run: |
gem build *.gemspec
gem push --KEY rubygems_api_key *.gem
- run: |
echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10})
- name: Login to Docker Hub
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Build the tagged Docker image
run: docker build . --file Dockerfile --tag hewlettpackardenterprise/hpe-oneview-sdk-for-ruby:${{ env.RELEASE_VERSION }}-OV5.4
- name: Push the tagged Docker image
run: docker push hewlettpackardenterprise/hpe-oneview-sdk-for-ruby:${{ env.RELEASE_VERSION }}-OV5.4
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -34,9 +34,9 @@ This release extends support to OneView Rest API version 2000 (OneView v5.40) fo
- Volume Attachment
- Volume Template


#### Bug fixes & Enhancements:
- Enhanced the method to set the default API version to appliance's max API version instead of hardcoded 200.
- Added an automation to upload package to Gems followed with uploading a new image to DockerHub when there is a new release in GitHub

## v5.15.0

Expand Down

0 comments on commit 2f2d0e3

Please sign in to comment.