Skip to content

Commit

Permalink
ci: Move init container release from lambda to GHA (#2848)
Browse files Browse the repository at this point in the history
  • Loading branch information
hmstepanek authored Jan 27, 2025
1 parent 559dc98 commit 8d8608d
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release-lambda-init-containers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Agent Release Lambda Layers and K8s Init Containers

on:
workflow_run:
workflows: ["Create Release"]
types:
- completed

jobs:
release-tags:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: npm install
- run: |
git config user.name ${GITHUB_ACTOR}
git config user.email gh-actions-${GITHUB_ACTOR}@github.com
- id: get_tag
run: echo "latest_tag=$(cat package.json | jq .version)" >> $GITHUB_OUTPUT
- name: Create release tags for Lambda and K8s Init Containers
run: |
RELEASE_TITLE="New Relic Node Agent v${{ steps.get_tag.outputs.latest_tag }}.0"
RELEASE_TAG="v${{ steps.get_tag.outputs.latest_tag }}.0_nodejs"
RELEASE_NOTES="Automated release for [Node Agent v${{ steps.get_tag.outputs.latest_tag }}](https://github.com/newrelic/node-newrelic/releases/tag/v${{ steps.get_tag.outputs.latest_tag }})"
gh auth login --with-token <<< $GH_RELEASE_TOKEN
echo "newrelic/newrelic-lambda-layers - Releasing \"${RELEASE_TITLE}\" with tag ${RELEASE_TAG}"
gh release create "${RELEASE_TAG}" --title="${RELEASE_TITLE}" --repo=newrelic/newrelic-lambda-layers --notes="${RELEASE_NOTES}"
echo "newrelic/newrelic-agent-init-container - Releasing \"${RELEASE_TITLE}\" with tag ${RELEASE_TAG}"
gh release create "${RELEASE_TAG}" --title="${RELEASE_TITLE}" --repo=newrelic/newrelic-agent-init-container --notes="${RELEASE_NOTES}"
env:
GH_RELEASE_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}

0 comments on commit 8d8608d

Please sign in to comment.