v2.9.0 #56
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: PR/Release pipeline | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
release: | |
types: | |
- published | |
jobs: | |
BuildAndTest: | |
name: Build And Test | |
runs-on: ubuntu-latest | |
env: | |
GOPATH: ${{ github.workspace }} | |
GO111MODULE: on | |
steps: | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: 1.19 | |
id: go | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} | |
- name: Install dependencies | |
run: | | |
go install | |
# Dependencies needed to generate the tile | |
sudo apt update && sudo apt install -y build-essential zlibc zlib1g-dev ruby ruby-dev openssl libxslt1-dev libxml2-dev libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 | |
curl -O -L https://github.com/cloudfoundry/bosh-cli/releases/download/v6.2.0/bosh-cli-6.2.0-linux-amd64 | |
chmod +x ./bosh-cli-6.2.0-linux-amd64 | |
sudo mv ./bosh-cli-6.2.0-linux-amd64 /usr/local/bin/bosh | |
curl -O -L https://github.com/cf-platform-eng/tile-generator/releases/download/v14.0.3/tile_linux-64bit | |
chmod +x tile_linux-64bit | |
sudo mv tile_linux-64bit /usr/local/bin/tile | |
- name: Get version | |
id: get_version | |
if: github.event.action == 'published' | |
run: | | |
TAG=${{ github.event.release.tag_name }} | |
# Remove 'v' from tag name | |
RELEASE_TAG=${TAG//v} | |
echo "RELEASE_TAG=${RELEASE_TAG}" >> $GITHUB_ENV | |
echo "::set-output name=VERSION::${RELEASE_TAG}" | |
- name: Test and Build | |
run: | | |
make release | |
- name: Upload Tile | |
if: github.event.action == 'published' | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}/product/nr-firehose-nozzle-${{ steps.get_version.outputs.VERSION }}.pivotal | |
asset_name: nr-firehose-nozzle-${{ steps.get_version.outputs.VERSION }}.pivotal | |
asset_content_type: Tile | |
- name: Upload Tarball | |
if: github.event.action == 'published' | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}/dist/nr-fh-nozzle.tar.gz | |
asset_name: nr-firehose-nozzle-${{ steps.get_version.outputs.VERSION }}.tar.gz | |
asset_content_type: Tarball |