upload linux to staging and windows to logging's bucket #21
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: Merge to master | |
on: | |
push: | |
branches: | |
- test_main | |
jobs: | |
get-release-tag: | |
name: Publish linux artifacts into s3 bucket | |
runs-on: ubuntu-latest | |
outputs: | |
tag: "tmp-pr-${{ steps.get_pr_number.outputs.result }}" | |
steps: | |
- name: Get PR number | |
uses: actions/github-script@v6 | |
id: get_pr_number | |
run: | | |
echo 'what' | |
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 | |
publish-linux: | |
name: Publish linux packages to staging and production buckets | |
needs: get-release-tag | |
runs-on: ubuntu-latest | |
steps: | |
- name: Publish linux packages to staging | |
uses: newrelic/[email protected] | |
env: | |
TAG: ${{ needs.get-release-tag.outputs.tag }} | |
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-staging" | |
AWS_S3_LOCK_BUCKET_NAME: "onhost-ci-lock-staging" | |
AWS_REGION: "us-east-1" | |
AWS_ACCESS_KEY_ID: ${{ secrets.OHAI_AWS_ACCESS_KEY_ID_STAGING }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.OHAI_AWS_SECRET_ACCESS_KEY_STAGING }} | |
AWS_ROLE_ARN: ${{ secrets.OHAI_AWS_ROLE_ARN_STAGING }} | |
AWS_ROLE_SESSION_NAME: ${{ secrets.OHAI_AWS_ROLE_SESSION_NAME_STAGING }} | |
with: | |
tag: ${{env.TAG}} | |
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: "staging" | |
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 }} | |
# TODO: fill with prod parameters when ready | |
#- name: Publish linux packages to production | |
publish-windows: | |
name: Publish windows packages to logging's production bucket | |
needs: get-release-tag | |
uses: ./.github/workflows/run_task.yml | |
with: | |
container_make_target: "upload-win-packages" | |
ref: ${{ needs.get-release-tag.outputs.tag }} | |
secrets: inherit |