CI #3244
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: CI | |
on: | |
push: | |
schedule: | |
- cron: "35 */6 * * *" | |
jobs: | |
configure: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout to repository | |
uses: actions/checkout@v4 | |
- name: Set matrix data | |
id: set-matrix | |
run: echo "matrix=$(jq -c . < ./distro_versions.json)" >> $GITHUB_OUTPUT | |
build: | |
runs-on: ubuntu-latest | |
needs: configure | |
strategy: | |
# allow pushing successfully built images anyway | |
fail-fast: false | |
matrix: ${{ fromJson(needs.configure.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Set up RPM client User-Agent for images" | |
run: | | |
sed -i "s@XXXXXXXXXX@${{ secrets.RPMBUILDER_UA }}@g" assets/transient/fix-repos.sh | |
sed -i "s@XXXXXXXXXX@${{ secrets.RPMBUILDER_UA }}@g" assets/transient/user-agent.py | |
- name: Generate Dockerfile | |
run: ./crypt-keeper.sh generate ${{ matrix.os }} ${{ matrix.version }} | |
- name: Log in to Docker Hub | |
run: docker login -u="${{ secrets.DOCKER_USER }}" -p="${{ secrets.DOCKER_PASS }}" | |
- name: Build Docker image | |
run: ./crypt-keeper.sh build ${{ matrix.os }} ${{ matrix.version }} | |
- name: Test RPM Build using the image | |
run: ./crypt-keeper.sh test ${{ matrix.os }} ${{ matrix.version }} | |
- name: Push to Docker Hub | |
run: ./crypt-keeper.sh push ${{ matrix.os }} ${{ matrix.version }} |