-
Notifications
You must be signed in to change notification settings - Fork 25
55 lines (53 loc) · 2.01 KB
/
build_rpms.yaml
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
45
46
47
48
49
50
51
52
53
54
55
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@v3
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 }}" }