Merge branch 'newrelic:master' into ptest #34
Workflow file for this run
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
name: Publish Ruby Layers | |
on: | |
push: | |
tags: | |
- v**_ruby | |
jobs: | |
publish-ruby: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby-version: [3.2, 3.3] | |
steps: | |
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # tag v4.1.2 | |
- name: Use Ruby ${{ matrix.ruby-version }} | |
uses: ruby/setup-ruby@1198b074305f9356bd56dd4b311757cc0dab2f1c # tag v1.175.1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
- name: Check Tag | |
id: ruby-check-tag | |
run: | | |
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+(\.[0-9]+)*_ruby$ ]]; then | |
echo "match=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Clean the workspace | |
run: ./bin/clean | |
working-directory: ruby | |
- name: Install Ruby Dependencies | |
run: bundle | |
working-directory: ruby | |
- name: Obtain Ruby version without the dot | |
id: ruby-version-without-dot | |
run: >- | |
echo "::set-output name=VERSION::$( | |
echo ${{ matrix.ruby-version }} | sed 's/\.//' | |
)" | |
- name: Build and Publish layer | |
if: steps.ruby-check-tag.outputs.match == 'true' | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: ./publish-layers.sh ruby${{ matrix.ruby-version }} | |
working-directory: ruby |