Skip to content

Dev release for branch remove-api-products-from-idp #8

Dev release for branch remove-api-products-from-idp

Dev release for branch remove-api-products-from-idp #8

name: Dev Release
run-name: Dev release for branch ${{ github.ref_name }}
on:
workflow_dispatch:
jobs:
set-version: # Get version as first job to re-use the value without needing to re-calculate it.
name: Set Version for Dev Release
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
version: ${{ steps.set_version.outputs.version }}
steps:
- uses: actions/checkout@v4
- id: set_version
run: |
# In order to publish Helm charts we need valid semantic version, so we get the latest release tag to prefix the version with.
git fetch --tags
# Try to get the latest tag, fallback to 0.0.0 if no tag is found
LATEST_RELEASE=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
BRANCH=$(echo $(git rev-parse --abbrev-ref HEAD) | tr -d '0123456789/.')
VERSION=$LATEST_RELEASE-dev-$BRANCH-$(git rev-parse --short HEAD)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Set version to $VERSION"
docker-release:
runs-on: ubuntu-latest
needs: [set-version]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Gcloud Login
uses: google-github-actions/setup-gcloud@a48b55b3b0eeaf77b6e1384aab737fbefe2085ac
with:
version: '386.0.0'
project_id: gloo-mesh
service_account_key: ${{ secrets.ARTIFACT_PUSHER_JSON_KEY }}
export_default_credentials: true
- name: Publish Docker image
env:
TAGGED_VERSION: ${{ needs.set-version.outputs.version }}
PROJECT: gloo-mesh
run: |
make docker-release
release-helm:
name: Release gloo-portal-idp-connect helm chart
needs: [set-version]
runs-on: ubuntu-20.04
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3
- name: Gcloud Login
uses: google-github-actions/setup-gcloud@a48b55b3b0eeaf77b6e1384aab737fbefe2085ac
with:
version: '386.0.0'
project_id: gloo-mesh
service_account_key: ${{ secrets.GLOO_RELEASE_ADMIN }}
export_default_credentials: true
- name: Publish Helm
env:
TAGGED_VERSION: ${{ needs.set-version.outputs.version }}
run: |
make publish-chart