Merge pull request #983 from kiwix/multiple-ci-cd-fixes

Multiple CI/CD fixes
This commit is contained in:
Kelson 2023-10-08 16:47:29 +02:00 committed by GitHub
commit 2650cdd7da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 6 deletions

View File

@ -83,7 +83,7 @@ jobs:
HOME: /home/runner HOME: /home/runner
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: container:
image: "ghcr.io/kiwix/kiwix-build_ci_${{matrix.image_variant}}:37" image: "ghcr.io/kiwix/kiwix-build_ci_${{matrix.image_variant}}:38"
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3

View File

@ -5,14 +5,17 @@ on:
push: push:
branches: branches:
- main - main
release:
types: [published]
jobs: jobs:
build-deb: build-deb:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
distro: distro:
- debian-unstable
- ubuntu-jammy - ubuntu-jammy
- ubuntu-focal - ubuntu-focal
steps: steps:
@ -37,6 +40,13 @@ jobs:
email: release+launchpad@kiwix.org email: release+launchpad@kiwix.org
distro: ${{ matrix.distro }} distro: ${{ matrix.distro }}
- uses: legoktm/gh-action-build-deb@debian-unstable
if: matrix.distro == 'debian-unstable'
name: Build package for debian-unstable
id: build-debian-unstable
with:
args: --no-sign
- uses: legoktm/gh-action-build-deb@ubuntu-jammy - uses: legoktm/gh-action-build-deb@ubuntu-jammy
if: matrix.distro == 'ubuntu-jammy' if: matrix.distro == 'ubuntu-jammy'
name: Build package for ubuntu-jammy name: Build package for ubuntu-jammy
@ -60,7 +70,7 @@ jobs:
- uses: legoktm/gh-action-dput@master - uses: legoktm/gh-action-dput@master
name: Upload dev package name: Upload dev package
# Only upload on pushes to git default branch # Only upload on pushes to main
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main' && startswith(matrix.distro, 'ubuntu-') if: github.event_name == 'push' && github.event.ref == 'refs/heads/main' && startswith(matrix.distro, 'ubuntu-')
with: with:
gpg_key: ${{ secrets.LAUNCHPAD_GPG }} gpg_key: ${{ secrets.LAUNCHPAD_GPG }}
@ -69,10 +79,8 @@ jobs:
- uses: legoktm/gh-action-dput@master - uses: legoktm/gh-action-dput@master
name: Upload release package name: Upload release package
# Only upload on pushes to master or tag if: github.event_name == 'release' && startswith(matrix.distro, 'ubuntu-')
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && startswith(matrix.distro, 'ubuntu-')
with: with:
gpg_key: ${{ secrets.LAUNCHPAD_GPG }} gpg_key: ${{ secrets.LAUNCHPAD_GPG }}
repository: ppa:kiwixteam/release repository: ppa:kiwixteam/release
packages: output/*_source.changes packages: output/*_source.changes