Skip to content

RHEL 8

RHEL 8 #132

Workflow file for this run

name: RHEL 8
on:
schedule:
- cron: "0 1 * * *"
workflow_dispatch: {}
jobs:
rhel8-update:
strategy:
matrix:
platform_arch: [ "amd64", "arm64" ]
include:
- platform_arch: "amd64"
btfhub_arch: "x86_64"
repo_arch: "x86_64"
- platform_arch: "arm64"
btfhub_arch: "arm64"
repo_arch: "aarch64"
name: rhel 8 ${{ matrix.btfhub_arch }}
runs-on: ubuntu-latest
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: setup QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: ${{ matrix.platform_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 "[email protected]"
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)