Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Move init container release from lambda to GHA #2848

Merged
merged 5 commits into from
Jan 27, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,34 @@ jobs:
GITHUB_TOKEN: ${{ secrets.NODE_AGENT_GH_TOKEN }}
GITHUB_USER: ${{ vars.NODE_AGENT_CI_USER_NAME }}
GITHUB_EMAIL: ${{ vars.NODE_AGENT_CI_USER_EMAIL }}

release-tags:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this job changes the description of the workflow on line 7, at the very least.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a GHA expert so forgive me. Which line in this is causing it to override the description? Line 69 is just the name of the job so that shouldn't override the description as far as I know.
I can certainly make this it's own workflow. I can understand wanting to run the docs separately on occasion.

Copy link
Contributor

@jsumners-nr jsumners-nr Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not saying that your addition is overriding the description. I'm saying that the changes are not in line with the description, aka changes the stated purpose of the workflow.

runs-on: ubuntu-latest
if:
(github.event.workflow_run && github.event.workflow_run.conclusion == 'success') ||
(github.event_name == 'workflow_dispatch')
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 }}
Loading