RHEL 8 #232
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: RHEL 8 | |
on: | |
schedule: | |
- cron: "0 1 * * *" | |
workflow_dispatch: {} | |
env: | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
jobs: | |
rhel8-update: | |
strategy: | |
matrix: | |
platform_arch: [ "amd64", "arm64" ] | |
include: | |
- platform_arch: "amd64" | |
os: "ubuntu-22.04" | |
btfhub_arch: "x86_64" | |
repo_arch: "x86_64" | |
- platform_arch: "arm64" | |
os: "arm-4core-linux-arm-limited" | |
btfhub_arch: "arm64" | |
repo_arch: "aarch64" | |
name: rhel 8 ${{ matrix.btfhub_arch }} | |
runs-on: "${{ matrix.os }}" | |
steps: | |
- name: github authenticate | |
run: | | |
gh auth login --with-token <<<'${{ secrets.DD_BTFHUB_BOT_GITHUB_TOKEN }}' | |
- name: checkout btfhub | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.DD_BTFHUB_BOT_GITHUB_TOKEN }} | |
submodules: 'recursive' | |
- name: checkout btfhub-archive | |
uses: actions/checkout@v3 | |
with: | |
repository: DataDog/btfhub-archive | |
ref: main | |
token: ${{ secrets.DD_BTFHUB_BOT_GITHUB_TOKEN }} | |
path: archive | |
sparse-checkout: | | |
rhel/8/${{ matrix.btfhub_arch }} | |
- name: run in docker | |
run: | | |
docker run \ | |
--rm \ | |
-v $(pwd):/${{ github.workspace }} \ | |
-w ${{ github.workspace }} \ | |
--platform linux/${{ matrix.platform_arch }} \ | |
registry.access.redhat.com/ubi8/ubi:latest \ | |
ci/rhel8.sh ${{ matrix.btfhub_arch }} ${{ matrix.repo_arch }} ${{ secrets.DD_BTFHUB_RHEL_ORG_ID }} | |
- name: check status | |
run: | | |
cd archive | |
git status | |
- name: commit and push to btfhub-archive | |
run: | | |
cd archive | |
git config --local user.name "Bryce Kahle" | |
git config --local user.email "bryce.kahle@datadoghq.com" | |
git add -A | |
git diff-index --quiet HEAD || git commit -m "rhel 8 ${{ matrix.btfhub_arch }} update on $(date -u +%Y-%m-%d)" | |
git push || (git pull --rebase && git push) |