GitHub actions: publish packages

This commit is contained in:
Alexander A. Klimov 2020-05-19 15:42:05 +02:00
parent f71be9e802
commit 0537543ef3
1 changed files with 49 additions and 22 deletions

View File

@ -13,12 +13,18 @@ jobs:
strategy: strategy:
matrix: matrix:
distro: distro:
- debian/buster - name: debian
- debian/stretch codename: buster
- debian/jessie - name: debian
- ubuntu/focal codename: stretch
- ubuntu/bionic - name: debian
- ubuntu/xenial codename: jessie
- name: ubuntu
codename: focal
- name: ubuntu
codename: bionic
- name: ubuntu
codename: xenial
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -43,7 +49,7 @@ jobs:
-e ICINGA_BUILD_PROJECT=icinga2 \ -e ICINGA_BUILD_PROJECT=icinga2 \
-e ICINGA_BUILD_TYPE=snapshot \ -e ICINGA_BUILD_TYPE=snapshot \
-e UPSTREAM_GIT_URL=file:///icinga2.git \ -e UPSTREAM_GIT_URL=file:///icinga2.git \
registry.icinga.com/build-docker/${{ matrix.distro }} \ registry.icinga.com/build-docker/${{ matrix.distro.name }}/${{ matrix.distro.codename }} \
icinga-build-deb-source icinga-build-deb-source
- name: Restore/backup ccache - name: Restore/backup ccache
@ -51,7 +57,7 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: deb-icinga2/ccache path: deb-icinga2/ccache
key: '${{ matrix.distro }}-ccache' key: '${{ matrix.distro.name }}/${{ matrix.distro.codename }}-ccache'
- name: Binary - name: Binary
run: | run: |
@ -64,7 +70,7 @@ jobs:
-w /deb-icinga2 \ -w /deb-icinga2 \
-e ICINGA_BUILD_PROJECT=icinga2 \ -e ICINGA_BUILD_PROJECT=icinga2 \
-e ICINGA_BUILD_TYPE=snapshot \ -e ICINGA_BUILD_TYPE=snapshot \
registry.icinga.com/build-docker/${{ matrix.distro }} \ registry.icinga.com/build-docker/${{ matrix.distro.name }}/${{ matrix.distro.codename }} \
icinga-build-deb-binary icinga-build-deb-binary
- name: Test - name: Test
@ -75,23 +81,38 @@ jobs:
-w /deb-icinga2 \ -w /deb-icinga2 \
-e ICINGA_BUILD_PROJECT=icinga2 \ -e ICINGA_BUILD_PROJECT=icinga2 \
-e ICINGA_BUILD_TYPE=snapshot \ -e ICINGA_BUILD_TYPE=snapshot \
registry.icinga.com/build-docker/${{ matrix.distro }} \ registry.icinga.com/build-docker/${{ matrix.distro.name }}/${{ matrix.distro.codename }} \
icinga-build-test icinga-build-test
- name: Artifacts
uses: actions/upload-artifact@v1
with:
name: '${{ matrix.distro.name }}-${{ matrix.distro.codename }}-packages'
path: deb-icinga2/build
rpm: rpm:
name: .rpm name: .rpm
strategy: strategy:
matrix: matrix:
distro: distro:
- centos/8 - name: centos
- centos/7 release: 8
- centos/6 - name: centos
- fedora/32 release: 7
- fedora/31 - name: centos
- fedora/30 release: 6
- fedora/29 - name: fedora
- opensuse/15.1 release: 32
- opensuse/15.0 - name: fedora
release: 31
- name: fedora
release: 30
- name: fedora
release: 29
- name: opensuse
release: '15.1'
- name: opensuse
release: '15.0'
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -110,7 +131,7 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: rpm-icinga2/ccache path: rpm-icinga2/ccache
key: '${{ matrix.distro }}-ccache' key: '${{ matrix.distro.name }}/${{ matrix.distro.release }}-ccache'
- name: Binary - name: Binary
run: | run: |
@ -126,7 +147,7 @@ jobs:
-e ICINGA_BUILD_PROJECT=icinga2 \ -e ICINGA_BUILD_PROJECT=icinga2 \
-e ICINGA_BUILD_TYPE=snapshot \ -e ICINGA_BUILD_TYPE=snapshot \
-e UPSTREAM_GIT_URL=file:///icinga2.git \ -e UPSTREAM_GIT_URL=file:///icinga2.git \
registry.icinga.com/build-docker/${{ matrix.distro }} \ registry.icinga.com/build-docker/${{ matrix.distro.name }}/${{ matrix.distro.release }} \
icinga-build-package icinga-build-package
- name: Test - name: Test
@ -137,5 +158,11 @@ jobs:
-w /rpm-icinga2 \ -w /rpm-icinga2 \
-e ICINGA_BUILD_PROJECT=icinga2 \ -e ICINGA_BUILD_PROJECT=icinga2 \
-e ICINGA_BUILD_TYPE=snapshot \ -e ICINGA_BUILD_TYPE=snapshot \
registry.icinga.com/build-docker/${{ matrix.distro }} \ registry.icinga.com/build-docker/${{ matrix.distro.name }}/${{ matrix.distro.release }} \
icinga-build-test icinga-build-test
- name: Artifacts
uses: actions/upload-artifact@v1
with:
name: '${{ matrix.distro.name }}-${{ matrix.distro.release }}-packages'
path: rpm-icinga2/build