New Relic - AWS Logs Ingestion - Release #25
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: New Relic - AWS Logs Ingestion - Release | |
on: | |
release: | |
types: [released] | |
jobs: | |
release: | |
strategy: | |
matrix: | |
python-version: ["3.11"] | |
poetry-version: ["1.4"] | |
os: [ubuntu-22.04] | |
runs-on: ${{ matrix.os }} | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install Project | |
run: poetry install --no-interaction | |
- name: Test | |
run: poetry run pytest | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: ${{ secrets.AWS_SAR_PUBLISHER_ROLE }} | |
aws-region: us-east-1 | |
- name: Build & Package & Publish | |
run: | | |
poetry export -o src/requirements.txt --without-hashes | |
poetry run sam validate | |
poetry run sam build | |
poetry run sam package --s3-bucket nr-serverless-applications --output-template-file packaged.yaml | |
poetry run sam publish --region us-east-1 --template packaged.yaml | |
notify: | |
runs-on: ubuntu-latest | |
needs: release | |
steps: | |
- name: Send release details to Slack workflow | |
id: slack | |
uses: slackapi/[email protected] | |
with: | |
payload: | | |
{ | |
"releaseUrl": ":github: ${{ github.event.release.html_url }}", | |
"releaseName": "${{ github.event.release.name }}", | |
"productName": "${{ env.PRODUCT_NAME }}", | |
"productUrl": "${{ env.PRODUCT_URL }}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
PRODUCT_NAME: NewRelic-log-ingestion | |
PRODUCT_URL: https://serverlessrepo.aws.amazon.com/applications/us-east-1/463657938898/NewRelic-log-ingestion |