Skip to content

Merge to master publish linux packages (#77) #6

Merge to master publish linux packages (#77)

Merge to master publish linux packages (#77) #6

Workflow file for this run

name: Merge to master
on:
push:
branches:
- test_main
jobs:
publishing-to-s3:
name: Publish linux artifacts into s3 bucket
runs-on: ubuntu-latest
steps:
- name: Get PR number
uses: actions/github-script@v6
id: get_pr_number
with:
script: |
return (
await github.rest.repos.listPullRequestsAssociatedWithCommit({
commit_sha: context.sha,
owner: context.repo.owner,
repo: context.repo.repo,
})
).data[0].number;
result-encoding: string
- name: Publish packages
uses: newrelic/[email protected]
env:
TAG: "tmp-pr-${{ steps.get_pr_number.outputs.result }}"
GPG_MAIL: ${{ secrets.LOGGING_GPG_MAIL }}
GPG_PASSPHRASE: ${{ secrets.OHAI_GPG_PASSPHRASE }}
GPG_PRIVATE_KEY_BASE64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded
AWS_S3_BUCKET_NAME: "nr-downloads-ohai-testing"
AWS_S3_LOCK_BUCKET_NAME: "onhost-ci-lock-testing"
AWS_REGION: "us-east-1"
AWS_ACCESS_KEY_ID: ${{ secrets.OHAI_AWS_ACCESS_KEY_ID_TESTING }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.OHAI_AWS_SECRET_ACCESS_KEY_TESTING }}
AWS_ROLE_ARN: ${{ secrets.OHAI_AWS_ROLE_ARN_TESTING }}
AWS_ROLE_SESSION_NAME: ${{ secrets.OHAI_AWS_ROLE_SESSION_NAME_TESTING }}
with:
tag: ${{env.TAG}}
dest_prefix: "logging-test/"
repo_name: "newrelic/fluent-bit-package"
schema: "custom"
schema_url: "https://github.com/newrelic/fluent-bit-package/releases/download/${{ env.TAG }}/generated-linux-schema.yaml"
aws_access_key_id: ${{ env.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ env.AWS_SECRET_ACCESS_KEY }}
aws_s3_bucket_name: ${{ env.AWS_S3_BUCKET_NAME }}
aws_s3_lock_bucket_name: ${{ env.AWS_S3_LOCK_BUCKET_NAME }}
access_point_host: "testing"
run_id: ${{ github.run_id }}
aws_region: ${{ env.AWS_REGION }}
aws_role_session_name: ${{ env.AWS_ROLE_SESSION_NAME }}
aws_role_arn: ${{ env.AWS_ROLE_ARN }}
# used for signing package stuff
gpg_passphrase: ${{ env.GPG_PASSPHRASE }}
gpg_private_key_base64: ${{ env.GPG_PRIVATE_KEY_BASE64 }}