Build RPMs #378
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: Build RPMs | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
build_rpm_build_container: | |
if: github.repository_owner == 'ManageIQ' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up registry credentials | |
run: | | |
echo "REGISTRY_USERNAME=${{ secrets.DOCKER_REGISTRY_USERNAME }}" >> $GITHUB_ENV | |
echo "REGISTRY_PASSWORD=${{ secrets.DOCKER_REGISTRY_PASSWORD }}" >> $GITHUB_ENV | |
- name: Build and push RPM build image | |
run: bin/build_container_image | |
build_rpms: | |
needs: build_rpm_build_container | |
if: github.repository_owner == 'ManageIQ' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up registry credentials | |
run: | | |
echo "REGISTRY_USERNAME=${{ secrets.DOCKER_REGISTRY_USERNAME }}" >> $GITHUB_ENV | |
echo "REGISTRY_PASSWORD=${{ secrets.DOCKER_REGISTRY_PASSWORD }}" >> $GITHUB_ENV | |
- name: Prepare options file | |
run: | | |
mkdir -p /tmp/options | |
echo "---" > /tmp/options/options.yml | |
echo "rpm_repository:" >> /tmp/options/options.yml | |
echo " digitalocean_access_token: ${{ secrets.RPM_BUILD_DO_ACCESS_TOKEN }}" >> /tmp/options/options.yml | |
echo " s3_api:" >> /tmp/options/options.yml | |
echo " access_key: ${{ secrets.RPM_BUILD_S3_ACCESS_KEY }}" >> /tmp/options/options.yml | |
echo " secret_key: ${{ secrets.RPM_BUILD_S3_SECRET_KEY }}" >> /tmp/options/options.yml | |
- name: Build and push RPMs | |
run: bin/run_container_image | |
notify_builders: | |
needs: build_rpms | |
if: github.repository_owner == 'ManageIQ' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Notify manageiq-pods on RPM build | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.BUILD_TOKEN }} | |
repository: ManageIQ/manageiq-pods | |
event-type: build | |
client-payload: | | |
{ "repository": "${{ github.repository }}", | |
"ref_name": "${{ github.ref_name }}", | |
"sha": "${{ github.sha }}" } |