-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Move init container release from lambda to GHA (#2848)
- Loading branch information
1 parent
559dc98
commit 8d8608d
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
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
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 }} |