-
Notifications
You must be signed in to change notification settings - Fork 131
44 lines (40 loc) · 1.77 KB
/
repository_latest_added_packages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: . 🔍🔍 Show the latest added packages into the S3 repository
on:
workflow_dispatch:
inputs:
count:
description: 'Show the latest N packages'
type: string
default: '1000'
required: true
environment:
type: choice
required: true
description: 'Environment to run the action'
options:
- staging
- production
default: 'staging'
jobs:
list-packages:
name: List latest added packages into the S3 repository
runs-on: ubuntu-24.04
steps:
- name: List latest packages in Production S3
if: ${{ github.event.inputs.environment == 'production' }}
run: |
TZ="UTC" aws s3 ls s3://nr-downloads-main/infrastructure_agent/ --recursive | sort | grep -E "\.(rpm|deb)$" | tail -n ${{ github.event.inputs.count }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.OHAI_AWS_ACCESS_KEY_ID_PRODUCTION }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.OHAI_AWS_SECRET_ACCESS_KEY_PRODUCTION }}
AWS_ROLE_ARN: ${{ secrets.OHAI_AWS_ROLE_ARN_PRODUCTION }}
AWS_ROLE_SESSION_NAME: ${{ secrets.OHAI_AWS_ROLE_SESSION_NAME_PRODUCTION }}
- name: List latest packages in Staging S3
if: ${{ github.event.inputs.environment == 'staging' }}
run: |
TZ="UTC" aws s3 ls s3://nr-downloads-ohai-staging/infrastructure_agent/ --recursive | sort | grep -E "\.(rpm|deb)$" | tail -n ${{ github.event.inputs.count }}
env:
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 }}