Skip to content

RHEL 9 compose trigger #2736

RHEL 9 compose trigger

RHEL 9 compose trigger #2736

Workflow file for this run

---
name: RHEL 9 compose trigger
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * *'
- cron: '0 8 * * *'
- cron: '0 14 * * *'
- cron: '0 20 * * *'
env:
COMPOSE_URL_90: "http://${{ secrets.DOWNLOAD_NODE }}/rhel-9/nightly/updates/RHEL-9"
COMPOSE_URL_92: "http://${{ secrets.DOWNLOAD_NODE }}/rhel-9/nightly/updates/RHEL-9"
COMPOSE_URL_93: "http://${{ secrets.DOWNLOAD_NODE }}/rhel-9/nightly/updates/RHEL-9"
COMPOSE_URL_94: "http://${{ secrets.DOWNLOAD_NODE }}/rhel-9/nightly/updates/RHEL-9"
COMPOSE_URL_95: "http://${{ secrets.DOWNLOAD_NODE }}/rhel-9/nightly/RHEL-9"
jobs:
check-compose:
# Do not run this job on any fork repos
if: github.repository == 'virt-s1/rhel-edge'
runs-on: container-runner
container: quay.io/fedora/fedora:38-x86_64
steps:
- uses: actions/checkout@v3
- run: sudo dnf install -y gh
- name: Check RHEL 9.0 compose
id: check_compose_id_90
run: |
curl -s ${COMPOSE_URL_90}/latest-RHEL-9.0.0/STATUS --output STATUS_90
STATUS_90=$(cat STATUS_90)
if [[ "$STATUS_90" == "FINISHED" ]]; then
curl -s ${COMPOSE_URL_90}/latest-RHEL-9.0.0/COMPOSE_ID --output COMPOSE_ID_90
COMPOSE_ID_90=$(cat COMPOSE_ID_90)
TESTED_COMPOSE_90=( $( cat compose/compose.90 ) )
if [[ " ${TESTED_COMPOSE_90[*]} " =~ "$COMPOSE_ID_90" ]]; then
COMPOSE_ID_90="false"
fi
else
COMPOSE_ID_90="false"
fi
if [[ "$COMPOSE_ID_90" != "false" ]]; then
gh pr list -R virt-s1/rhel-edge --state open --json title --jq '.[].title' > PR_LIST_90
PR_LIST_90=$(cat PR_LIST_90)
if [[ $PR_LIST_90 == *"$COMPOSE_ID_90"* ]]; then
echo "pr_running_90=true" >> $GITHUB_OUTPUT
else
echo "pr_running_90=false" >> $GITHUB_OUTPUT
fi
OSBUILD_VERSION_90=$(curl -s "${COMPOSE_URL_90}/${COMPOSE_ID_90}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-[0-9].*<" | tr -d "><")
OSBUILD_COMPOSER_VERSION_90=$(curl -s "${COMPOSE_URL_90}/${COMPOSE_ID_90}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-composer-[0-9].*<" | tr -d "><")
COMPOSER_CLI_VERSION_90=$(curl -s "${COMPOSE_URL_90}/${COMPOSE_ID_90}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">weldr-client-[0-9].*<" | tr -d "><")
echo "osbuild_version_90=$OSBUILD_VERSION_90" >> $GITHUB_OUTPUT
echo "osbuild_composer_version_90=$OSBUILD_COMPOSER_VERSION_90" >> $GITHUB_OUTPUT
echo "composer_cli_version_90=$COMPOSER_CLI_VERSION_90" >> $GITHUB_OUTPUT
else
echo "osbuild_version_90=Null" >> $GITHUB_OUTPUT
echo "osbuild_composer_version_90=Null" >> $GITHUB_OUTPUT
echo "composer_cli_version_90=Null" >> $GITHUB_OUTPUT
fi
echo "rhel90_compose=$COMPOSE_ID_90" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check RHEL 9.2 compose
id: check_compose_id_92
run: |
curl -s ${COMPOSE_URL_92}/latest-RHEL-9.2.0/STATUS --output STATUS_92
STATUS_92=$(cat STATUS_92)
if [[ "$STATUS_92" == "FINISHED" ]]; then
curl -s ${COMPOSE_URL_92}/latest-RHEL-9.2.0/COMPOSE_ID --output COMPOSE_ID_92
COMPOSE_ID_92=$(cat COMPOSE_ID_92)
TESTED_COMPOSE_92=( $( cat compose/compose.92 ) )
if [[ " ${TESTED_COMPOSE_92[*]} " =~ "$COMPOSE_ID_92" ]]; then
COMPOSE_ID_92="false"
fi
else
COMPOSE_ID_92="false"
fi
if [[ "$COMPOSE_ID_92" != "false" ]]; then
gh pr list -R virt-s1/rhel-edge --state open --json title --jq '.[].title' > PR_LIST_92
PR_LIST_92=$(cat PR_LIST_92)
if [[ $PR_LIST_92 == *"$COMPOSE_ID_92"* ]]; then
echo "pr_running_92=true" >> $GITHUB_OUTPUT
else
echo "pr_running_92=false" >> $GITHUB_OUTPUT
fi
OSBUILD_VERSION_92=$(curl -s "${COMPOSE_URL_92}/${COMPOSE_ID_92}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-[0-9].*<" | tr -d "><")
OSBUILD_COMPOSER_VERSION_92=$(curl -s "${COMPOSE_URL_92}/${COMPOSE_ID_92}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-composer-[0-9].*<" | tr -d "><")
COMPOSER_CLI_VERSION_92=$(curl -s "${COMPOSE_URL_92}/${COMPOSE_ID_92}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">weldr-client-[0-9].*<" | tr -d "><")
echo "osbuild_version_92=$OSBUILD_VERSION_92" >> $GITHUB_OUTPUT
echo "osbuild_composer_version_92=$OSBUILD_COMPOSER_VERSION_92" >> $GITHUB_OUTPUT
echo "composer_cli_version_92=$COMPOSER_CLI_VERSION_92" >> $GITHUB_OUTPUT
else
echo "osbuild_version_92=Null" >> $GITHUB_OUTPUT
echo "osbuild_composer_version_92=Null" >> $GITHUB_OUTPUT
echo "composer_cli_version_92=Null" >> $GITHUB_OUTPUT
fi
echo "rhel92_compose=$COMPOSE_ID_92" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check RHEL 9.3 compose
id: check_compose_id_93
run: |
curl -s ${COMPOSE_URL_93}/latest-RHEL-9.3.0/STATUS --output STATUS_93
STATUS_93=$(cat STATUS_93)
if [[ "$STATUS_93" == "FINISHED" ]]; then
curl -s ${COMPOSE_URL_93}/latest-RHEL-9.3.0/COMPOSE_ID --output COMPOSE_ID_93
COMPOSE_ID_93=$(cat COMPOSE_ID_93)
TESTED_COMPOSE_93=( $( cat compose/compose.93 ) )
if [[ " ${TESTED_COMPOSE_93[*]} " =~ "$COMPOSE_ID_93" ]]; then
COMPOSE_ID_93="false"
fi
else
COMPOSE_ID_93="false"
fi
if [[ "$COMPOSE_ID_93" != "false" ]]; then
gh pr list -R virt-s1/rhel-edge --state open --json title --jq '.[].title' > PR_LIST_93
PR_LIST_93=$(cat PR_LIST_93)
if [[ $PR_LIST_93 == *"$COMPOSE_ID_93"* ]]; then
echo "pr_running_93=true" >> $GITHUB_OUTPUT
else
echo "pr_running_93=false" >> $GITHUB_OUTPUT
fi
OSBUILD_VERSION_93=$(curl -s "${COMPOSE_URL_93}/${COMPOSE_ID_93}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-[0-9].*<" | tr -d "><")
OSBUILD_COMPOSER_VERSION_93=$(curl -s "${COMPOSE_URL_93}/${COMPOSE_ID_93}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-composer-[0-9].*<" | tr -d "><")
COMPOSER_CLI_VERSION_93=$(curl -s "${COMPOSE_URL_93}/${COMPOSE_ID_93}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">weldr-client-[0-9].*<" | tr -d "><")
echo "osbuild_version_93=$OSBUILD_VERSION_93" >> $GITHUB_OUTPUT
echo "osbuild_composer_version_93=$OSBUILD_COMPOSER_VERSION_93" >> $GITHUB_OUTPUT
echo "composer_cli_version_93=$COMPOSER_CLI_VERSION_93" >> $GITHUB_OUTPUT
else
echo "osbuild_version_93=Null" >> $GITHUB_OUTPUT
echo "osbuild_composer_version_93=Null" >> $GITHUB_OUTPUT
echo "composer_cli_version_93=Null" >> $GITHUB_OUTPUT
fi
echo "rhel93_compose=$COMPOSE_ID_93" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check RHEL 9.4 compose
id: check_compose_id_94
run: |
curl -s ${COMPOSE_URL_94}/latest-RHEL-9.4.0/STATUS --output STATUS_94
STATUS_94=$(cat STATUS_94)
if [[ "$STATUS_94" == "FINISHED" ]]; then
curl -s ${COMPOSE_URL_94}/latest-RHEL-9.4.0/COMPOSE_ID --output COMPOSE_ID_94
COMPOSE_ID_94=$(cat COMPOSE_ID_94)
TESTED_COMPOSE_94=( $( cat compose/compose.94 ) )
if [[ " ${TESTED_COMPOSE_94[*]} " =~ "$COMPOSE_ID_94" ]]; then
COMPOSE_ID_94="false"
fi
else
COMPOSE_ID_94="false"
fi
if [[ "$COMPOSE_ID_94" != "false" ]]; then
gh pr list -R virt-s1/rhel-edge --state open --json title --jq '.[].title' > PR_LIST_94
PR_LIST_94=$(cat PR_LIST_94)
if [[ $PR_LIST_94 == *"$COMPOSE_ID_94"* ]]; then
echo "pr_running_94=true" >> $GITHUB_OUTPUT
else
echo "pr_running_94=false" >> $GITHUB_OUTPUT
fi
OSBUILD_VERSION_94=$(curl -s "${COMPOSE_URL_94}/${COMPOSE_ID_94}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-[0-9].*<" | tr -d "><")
OSBUILD_COMPOSER_VERSION_94=$(curl -s "${COMPOSE_URL_94}/${COMPOSE_ID_94}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-composer-[0-9].*<" | tr -d "><")
COMPOSER_CLI_VERSION_94=$(curl -s "${COMPOSE_URL_94}/${COMPOSE_ID_94}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">weldr-client-[0-9].*<" | tr -d "><")
echo "osbuild_version_94=$OSBUILD_VERSION_94" >> $GITHUB_OUTPUT
echo "osbuild_composer_version_94=$OSBUILD_COMPOSER_VERSION_94" >> $GITHUB_OUTPUT
echo "composer_cli_version_94=$COMPOSER_CLI_VERSION_94" >> $GITHUB_OUTPUT
else
echo "osbuild_version_94=Null" >> $GITHUB_OUTPUT
echo "osbuild_composer_version_94=Null" >> $GITHUB_OUTPUT
echo "composer_cli_version_94=Null" >> $GITHUB_OUTPUT
fi
echo "rhel94_compose=$COMPOSE_ID_94" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check RHEL 9.5 compose
id: check_compose_id_95
run: |
curl -s ${COMPOSE_URL_95}/latest-RHEL-9.5.0/STATUS --output STATUS_95
STATUS_95=$(cat STATUS_95)
if [[ "$STATUS_95" == "FINISHED" ]]; then
curl -s ${COMPOSE_URL_95}/latest-RHEL-9.5.0/COMPOSE_ID --output COMPOSE_ID_95
COMPOSE_ID_95=$(cat COMPOSE_ID_95)
TESTED_COMPOSE_95=( $( cat compose/compose.95 ) )
if [[ " ${TESTED_COMPOSE_95[*]} " =~ "$COMPOSE_ID_95" ]]; then
COMPOSE_ID_95="false"
fi
else
COMPOSE_ID_95="false"
fi
if [[ "$COMPOSE_ID_95" != "false" ]]; then
gh pr list -R virt-s1/rhel-edge --state open --json title --jq '.[].title' > PR_LIST_95
PR_LIST_95=$(cat PR_LIST_95)
if [[ $PR_LIST_95 == *"$COMPOSE_ID_95"* ]]; then
echo "pr_running_95=true" >> $GITHUB_OUTPUT
else
echo "pr_running_95=false" >> $GITHUB_OUTPUT
fi
OSBUILD_VERSION_95=$(curl -s "${COMPOSE_URL_95}/${COMPOSE_ID_95}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-[0-9].*<" | tr -d "><")
OSBUILD_COMPOSER_VERSION_95=$(curl -s "${COMPOSE_URL_95}/${COMPOSE_ID_95}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">osbuild-composer-[0-9].*<" | tr -d "><")
COMPOSER_CLI_VERSION_95=$(curl -s "${COMPOSE_URL_95}/${COMPOSE_ID_95}/compose/AppStream/x86_64/os/Packages/" | grep -ioE ">weldr-client-[0-9].*<" | tr -d "><")
echo "osbuild_version_95=$OSBUILD_VERSION_95" >> $GITHUB_OUTPUT
echo "osbuild_composer_version_95=$OSBUILD_COMPOSER_VERSION_95" >> $GITHUB_OUTPUT
echo "composer_cli_version_95=$COMPOSER_CLI_VERSION_95" >> $GITHUB_OUTPUT
else
echo "osbuild_version_95=Null" >> $GITHUB_OUTPUT
echo "osbuild_composer_version_95=Null" >> $GITHUB_OUTPUT
echo "composer_cli_version_95=Null" >> $GITHUB_OUTPUT
fi
echo "rhel95_compose=$COMPOSE_ID_95" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputs:
rhel90_compose: ${{ steps.check_compose_id_90.outputs.rhel90_compose }}
rhel92_compose: ${{ steps.check_compose_id_92.outputs.rhel92_compose }}
rhel93_compose: ${{ steps.check_compose_id_93.outputs.rhel93_compose }}
rhel94_compose: ${{ steps.check_compose_id_94.outputs.rhel94_compose }}
rhel95_compose: ${{ steps.check_compose_id_95.outputs.rhel95_compose }}
osbuild_version_90: ${{ steps.check_compose_id_90.outputs.osbuild_version_90 }}
osbuild_composer_version_90: ${{ steps.check_compose_id_90.outputs.osbuild_composer_version_90 }}
composer_cli_version_90: ${{ steps.check_compose_id_90.outputs.composer_cli_version_90 }}
osbuild_version_92: ${{ steps.check_compose_id_92.outputs.osbuild_version_92 }}
osbuild_composer_version_92: ${{ steps.check_compose_id_92.outputs.osbuild_composer_version_92 }}
composer_cli_version_92: ${{ steps.check_compose_id_92.outputs.composer_cli_version_92 }}
osbuild_version_93: ${{ steps.check_compose_id_93.outputs.osbuild_version_93 }}
osbuild_composer_version_93: ${{ steps.check_compose_id_93.outputs.osbuild_composer_version_93 }}
composer_cli_version_93: ${{ steps.check_compose_id_93.outputs.composer_cli_version_93 }}
osbuild_version_94: ${{ steps.check_compose_id_94.outputs.osbuild_version_94 }}
osbuild_composer_version_94: ${{ steps.check_compose_id_94.outputs.osbuild_composer_version_94 }}
composer_cli_version_94: ${{ steps.check_compose_id_94.outputs.composer_cli_version_94 }}
osbuild_version_95: ${{ steps.check_compose_id_95.outputs.osbuild_version_95 }}
osbuild_composer_version_95: ${{ steps.check_compose_id_95.outputs.osbuild_composer_version_95 }}
composer_cli_version_95: ${{ steps.check_compose_id_95.outputs.composer_cli_version_95 }}
pr_running_90: ${{ steps.check_compose_id_90.outputs.pr_running_90 }}
pr_running_92: ${{ steps.check_compose_id_92.outputs.pr_running_92 }}
pr_running_93: ${{ steps.check_compose_id_93.outputs.pr_running_93 }}
pr_running_94: ${{ steps.check_compose_id_94.outputs.pr_running_94 }}
pr_running_95: ${{ steps.check_compose_id_95.outputs.pr_running_95 }}
rhel-9-0:
needs: check-compose
if: ${{ needs.check-compose.outputs.rhel90_compose != 'false' && needs.check-compose.outputs.pr_running_90 == 'false' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add new compose id in compose.90
run: |
compose_id="${{ needs.check-compose.outputs.rhel90_compose }}"
echo $compose_id >> compose/compose.90
cat compose/compose.90
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "${{ needs.check-compose.outputs.rhel90_compose }} - ${{ steps.date.outputs.date }}"
committer: cloudkitebot <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
branch: cpr
branch-suffix: random
delete-branch: true
title: "${{ needs.check-compose.outputs.rhel90_compose }} - ${{ steps.date.outputs.date }}"
labels: auto-merge,RHEL-9.0.0
body: |
RHEL 9.0 compose ${{ needs.check-compose.outputs.rhel90_compose }}
- Date: ${{ steps.date.outputs.date }}
- Packages:
- ${{ needs.check-compose.outputs.osbuild_version_90 }}
- ${{ needs.check-compose.outputs.osbuild_composer_version_90 }}
- ${{ needs.check-compose.outputs.composer_cli_version_90 }}
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: rebase
- name: Add a comment to trigger test workflow
uses: peter-evans/create-or-update-comment@v2
with:
token: ${{ secrets.PAT }}
issue-number: ${{ steps.cpr.outputs.pull-request-number }}
body: /test-rhel-9-0
- name: Create a project card to track compose test result
uses: peter-evans/create-or-update-project-card@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
project-name: RHEL Compose Test
column-name: RHEL-9-0
issue-number: ${{ steps.cpr.outputs.pull-request-number }}
rhel-9-2:
needs: check-compose
if: ${{ needs.check-compose.outputs.rhel92_compose != 'false' && needs.check-compose.outputs.pr_running_92 == 'false' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add new compose id in compose.92
run: |
compose_id="${{ needs.check-compose.outputs.rhel92_compose }}"
echo $compose_id >> compose/compose.92
cat compose/compose.92
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "${{ needs.check-compose.outputs.rhel92_compose }} - ${{ steps.date.outputs.date }}"
committer: cloudkitebot <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
branch: cpr
branch-suffix: random
delete-branch: true
title: "${{ needs.check-compose.outputs.rhel92_compose }} - ${{ steps.date.outputs.date }}"
labels: auto-merge,RHEL-9.2.0
body: |
RHEL 9.2 compose ${{ needs.check-compose.outputs.rhel92_compose }}
- Date: ${{ steps.date.outputs.date }}
- Packages:
- ${{ needs.check-compose.outputs.osbuild_version_92 }}
- ${{ needs.check-compose.outputs.osbuild_composer_version_92 }}
- ${{ needs.check-compose.outputs.composer_cli_version_92 }}
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: rebase
- name: Add a comment to trigger test workflow
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.PAT }}
issue-number: ${{ steps.cpr.outputs.pull-request-number }}
body: /test-rhel-9-2
- name: Create a project card to track compose test result
uses: peter-evans/create-or-update-project-card@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
project-name: RHEL Compose Test
column-name: RHEL-9-2
issue-number: ${{ steps.cpr.outputs.pull-request-number }}
rhel-9-3:
needs: check-compose
if: ${{ needs.check-compose.outputs.rhel93_compose != 'false' && needs.check-compose.outputs.pr_running_93 == 'false' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add new compose id in compose.93
run: |
compose_id="${{ needs.check-compose.outputs.rhel93_compose }}"
echo $compose_id >> compose/compose.93
cat compose/compose.93
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "${{ needs.check-compose.outputs.rhel93_compose }} - ${{ steps.date.outputs.date }}"
committer: cloudkitebot <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
branch: cpr
branch-suffix: random
delete-branch: true
title: "${{ needs.check-compose.outputs.rhel93_compose }} - ${{ steps.date.outputs.date }}"
labels: auto-merge,RHEL-9.3.0
body: |
RHEL 9.3 compose ${{ needs.check-compose.outputs.rhel93_compose }}
- Date: ${{ steps.date.outputs.date }}
- Packages:
- ${{ needs.check-compose.outputs.osbuild_version_93 }}
- ${{ needs.check-compose.outputs.osbuild_composer_version_93 }}
- ${{ needs.check-compose.outputs.composer_cli_version_93 }}
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: rebase
- name: Add a comment to trigger test workflow
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.PAT }}
issue-number: ${{ steps.cpr.outputs.pull-request-number }}
body: /test-rhel-9-3
- name: Create a project card to track compose test result
uses: peter-evans/create-or-update-project-card@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
project-name: RHEL Compose Test
column-name: RHEL-9-3
issue-number: ${{ steps.cpr.outputs.pull-request-number }}
rhel-9-4:
needs: check-compose
if: ${{ needs.check-compose.outputs.rhel94_compose != 'false' && needs.check-compose.outputs.pr_running_94 == 'false' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add new compose id in compose.94
run: |
compose_id="${{ needs.check-compose.outputs.rhel94_compose }}"
echo $compose_id >> compose/compose.94
cat compose/compose.94
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "${{ needs.check-compose.outputs.rhel94_compose }} - ${{ steps.date.outputs.date }}"
committer: cloudkitebot <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
branch: cpr
branch-suffix: random
delete-branch: true
title: "${{ needs.check-compose.outputs.rhel94_compose }} - ${{ steps.date.outputs.date }}"
labels: auto-merge,RHEL-9.4.0
body: |
RHEL 9.4 compose ${{ needs.check-compose.outputs.rhel94_compose }}
- Date: ${{ steps.date.outputs.date }}
- Packages:
- ${{ needs.check-compose.outputs.osbuild_version_94 }}
- ${{ needs.check-compose.outputs.osbuild_composer_version_94 }}
- ${{ needs.check-compose.outputs.composer_cli_version_94 }}
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: rebase
- name: Add a comment to trigger test workflow
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.PAT }}
issue-number: ${{ steps.cpr.outputs.pull-request-number }}
body: /test-rhel-9-4
- name: Create a project card to track compose test result
uses: peter-evans/create-or-update-project-card@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
project-name: RHEL Compose Test
column-name: RHEL-9-4
issue-number: ${{ steps.cpr.outputs.pull-request-number }}
rhel-9-5:
needs: check-compose
if: ${{ needs.check-compose.outputs.rhel95_compose != 'false' && needs.check-compose.outputs.pr_running_95 == 'false' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add new compose id in compose.95
run: |
compose_id="${{ needs.check-compose.outputs.rhel95_compose }}"
echo $compose_id >> compose/compose.95
cat compose/compose.95
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "${{ needs.check-compose.outputs.rhel95_compose }} - ${{ steps.date.outputs.date }}"
committer: cloudkitebot <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
branch: cpr
branch-suffix: random
delete-branch: true
title: "${{ needs.check-compose.outputs.rhel95_compose }} - ${{ steps.date.outputs.date }}"
labels: auto-merge,RHEL-9.5.0
body: |
RHEL 9.5 compose ${{ needs.check-compose.outputs.rhel95_compose }}
- Date: ${{ steps.date.outputs.date }}
- Packages:
- ${{ needs.check-compose.outputs.osbuild_version_95 }}
- ${{ needs.check-compose.outputs.osbuild_composer_version_95 }}
- ${{ needs.check-compose.outputs.composer_cli_version_95 }}
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: rebase
- name: Add a comment to trigger test workflow
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.PAT }}
issue-number: ${{ steps.cpr.outputs.pull-request-number }}
body: /test-rhel-9-5
- name: Create a project card to track compose test result
uses: peter-evans/create-or-update-project-card@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
project-name: RHEL Compose Test
column-name: RHEL-9-5
issue-number: ${{ steps.cpr.outputs.pull-request-number }}