GHA: explicitly specify whether $DISTRO packages require subscription

to have all info at one place in the file.
This commit is contained in:
Alexander A. Klimov 2022-02-28 13:08:30 +01:00
parent cf8923d628
commit 9013ebf0fb
1 changed files with 7 additions and 1 deletions

View File

@ -17,16 +17,22 @@ jobs:
distro:
- name: centos
release: 7
subscription: false
- name: fedora
release: 35
subscription: false
- name: fedora
release: 34
subscription: false
- name: sles
release: '15.3'
subscription: true
- name: sles
release: '12.5'
subscription: true
- name: opensuse
release: '15.3'
subscription: false
runs-on: ubuntu-latest
@ -43,7 +49,7 @@ jobs:
env:
GITLAB_REGISTRY_RO_TOKEN: '${{ secrets.GITLAB_REGISTRY_RO_TOKEN }}'
run: |
if [ '${{ matrix.distro.name }}' = sles ]; then
if [ ${{ matrix.distro.subscription }} = true ]; then
if [ "$(tr -d '\n' <<<"$GITLAB_REGISTRY_RO_TOKEN" |wc -c)" -eq 0 ]; then
echo '::set-output name=CAN_BUILD::false'
echo '::set-output name=NEED_LOGIN::false'