/
niceSOFT
/
tdnf
Обзор
Документация
Войти
/
niceSOFT
/
tdnf
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
.github/workflows/ci.yml
142 строки
3 KB
Shreenidhi Shedi
Use docker buildx in workflow
18 сен 2025, 17:32
18 сен 2025, 17:32
27912e3
Код
Авторство
О чём код?
name: tdnf CI on: - pull_request - push - workflow_dispatch jobs: docker-build: runs-on: ubuntu-latest strategy: fail-fast: false matrix: dist: [photon, fedora] env: DIST: ${{ matrix.dist }} steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build container images run: | docker buildx build \ --load \ --tag ${DIST}/tdnf-build \ --file ci/Dockerfile.${DIST} \ . - name: Save Docker images run: | docker save ${DIST}/tdnf-build > ${DIST}-tdnf-build.tar - name: Upload saved images uses: actions/upload-artifact@v4 with: name: docker-image-${{ matrix.dist }} path: ${{ matrix.dist }}-tdnf-build.tar load-images-and-test: runs-on: ubuntu-latest needs: docker-build strategy: fail-fast: false matrix: dist: [photon, fedora] env: DIST: ${{ matrix.dist }} steps: - uses: actions/checkout@v4 - name: Download image artifact uses: actions/download-artifact@v4 with: name: docker-image-${{ matrix.dist }} - name: Load Docker image run: | docker load < ${{ matrix.dist }}-tdnf-build.tar - name: Run container with tests run: | docker run --privileged --security-opt seccomp:unconfined --rm \ -e DIST \ -v "$(pwd)":/build \ -w /build \ "${DIST}/tdnf-build" \ ./ci/docker-entrypoint.sh llvm-tests: runs-on: ubuntu-latest needs: docker-build strategy: fail-fast: false matrix: dist: [photon, fedora] env: DIST: ${{ matrix.dist }} steps: - uses: actions/checkout@v4 - name: Download image artifact uses: actions/download-artifact@v4 with: name: docker-image-${{ matrix.dist }} - name: Load Docker image run: | docker load < ${{ matrix.dist }}-tdnf-build.tar - name: Run LLVM tests run: | docker run --privileged --security-opt seccomp:unconfined --rm \ -e DIST \ -v "$(pwd)":/build \ -w /build \ "${DIST}/tdnf-build" \ ./ci/llvm-tdnf-build.sh build-tdnf-rpms: runs-on: ubuntu-latest needs: docker-build env: DIST: photon steps: - uses: actions/checkout@v4 - name: Download image artifact uses: actions/download-artifact@v4 with: name: docker-image-photon - name: Load Docker image run: | docker load < photon-tdnf-build.tar - name: Build RPMs in container run: | docker run --rm \ -e DIST \ -v "$(pwd)":/build \ -w /build \ photon/tdnf-build \ ./ci/build-rpms.sh - name: Run pytests package run: | docker run --rm \ -v "$(pwd)/rpms":/rpms \ photon \ /bin/bash -c 'tdnf -y --repofrompath=tdnf,/rpms --nogpgcheck install tdnf-pytests && pytest /usr/share/tdnf/pytests/' - name: Upload RPMs uses: actions/upload-artifact@v4 with: name: tdnf-rpms path: rpms