From f01f6750b1cd749b9ad1891c7ed3bc34be52ef50 Mon Sep 17 00:00:00 2001 From: Chebrolu Bala Sai Harika <34155580+chebroluharika@users.noreply.github.com> Date: Fri, 11 Sep 2020 15:50:47 +0530 Subject: [PATCH] Update dockerimage.yml --- .github/workflows/dockerimage.yml | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index 60ea34573..eb28bba94 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -5,31 +5,19 @@ on: 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 + steps: + - uses: actions/checkout@v1 + name: Checkout code + - name: Release Gem + if: contains(github.ref, 'refs/tags/v') + uses: cadwallion/publish-rubygems-action@master 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 + RELEASE_COMMAND: rake release - run: | echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10}) - name: Login to Docker Hub