Sha256: 4024c3fea0c2f82fad5e637110f76a065a21d4b8d7e657fc9dd54f8157057b48
Contents?: true
Size: 1.98 KB
Versions: 2
Compression:
Stored size: 1.98 KB
Contents
name: Deploy on: push: tags: - '*' workflow_dispatch: jobs: deploy: name: Deploy to Rubygems runs-on: ubuntu-latest steps: - name: Checkout twilio-ruby uses: actions/checkout@v2 with: fetch-depth: 0 - name: Login to Docker Hub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_AUTH_TOKEN }} # The expression strips off the shortest match from the front of the string to yield just the tag name as the output - name: Get tagged version run: echo "GITHUB_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: Build and Push image run: make docker-build && make docker-push - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: 2.4 bundler-cache: true - run: bundle install - name: Publish to Rubygems env: GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }} run: | mkdir -p $HOME/.gem touch $HOME/.gem/credentials chmod 0600 $HOME/.gem/credentials printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials gem build *.gemspec gem push *.gem notify-on-failure: name: Slack notify on failure if: ${{ failure() }} needs: [deploy] runs-on: ubuntu-latest steps: - uses: rtCamp/action-slack-notify@v2 env: SLACK_COLOR: ${{ needs.deploy.status }} SLACK_ICON_EMOJI: ':github:' SLACK_MESSAGE: ${{ format('Failed to publish {1} to RubyGems{3} {0}/{1}/actions/runs/{2}', github.server_url, github.repository, github.run_id, ':') }} SLACK_TITLE: Deployment Failure SLACK_USERNAME: GitHub Actions SLACK_MSG_AUTHOR: twilio-dx SLACK_FOOTER: Posted automatically using GitHub Actions SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} MSG_MINIMAL: true
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
twilio-ruby-5.61.2 | .github/workflows/deploy.yml |
twilio-ruby-5.61.1 | .github/workflows/deploy.yml |