Skip to content

Commit

Permalink
pkg: Add support for Fedora 36, drop Fedora 33
Browse files Browse the repository at this point in the history
  • Loading branch information
StollD committed Apr 27, 2022
1 parent e1f0e6a commit bbf375c
Showing 1 changed file with 43 additions and 39 deletions.
82 changes: 43 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ jobs:
name: debian-latest
path: release

build-f35:
build-f36:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')

name: Build Fedora 35 package
name: Build Fedora 36 package
runs-on: ubuntu-latest
needs: [lint, test]
container:
image: fedora:35
image: fedora:36
options: --security-opt seccomp=unconfined

steps:
Expand Down Expand Up @@ -165,16 +165,18 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: fedora-35-latest
name: fedora-36-latest
path: pkg/fedora/out/x86_64

build-f34:
build-f35:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')

name: Build Fedora 34 package
name: Build Fedora 35 package
runs-on: ubuntu-latest
needs: [lint, test]
container: fedora:34
container:
image: fedora:35
options: --security-opt seccomp=unconfined

steps:
- name: Checkout code
Expand Down Expand Up @@ -208,16 +210,16 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: fedora-34-latest
name: fedora-35-latest
path: pkg/fedora/out/x86_64

build-f33:
build-f34:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')

name: Build Fedora 33 package
name: Build Fedora 34 package
runs-on: ubuntu-latest
needs: [lint, test]
container: fedora:33
container: fedora:34

steps:
- name: Checkout code
Expand Down Expand Up @@ -251,14 +253,14 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: fedora-33-latest
name: fedora-34-latest
path: pkg/fedora/out/x86_64

release:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')

name: Publish release
needs: [build-bin, build-deb, build-f35, build-f34, build-f33]
needs: [build-bin, build-deb, build-f36, build-f35, build-f34]
runs-on: ubuntu-latest

steps:
Expand All @@ -272,6 +274,11 @@ jobs:
with:
name: debian-latest

- name: Download Fedora 36 artifacts
uses: actions/download-artifact@v1
with:
name: fedora-36-latest

- name: Download Fedora 35 artifacts
uses: actions/download-artifact@v1
with:
Expand All @@ -282,11 +289,6 @@ jobs:
with:
name: fedora-34-latest

- name: Download Fedora 33 artifacts
uses: actions/download-artifact@v1
with:
name: fedora-33-latest

- name: Upload assets
uses: svenstaro/upload-release-action@v1-release
with:
Expand Down Expand Up @@ -347,12 +349,12 @@ jobs:
git commit -m "Update Debian DTX daemon"
git push --set-upstream origin "${update_branch}"
repo-f35:
name: Update Fedora 35 package repository
repo-f36:
name: Update Fedora 36 package repository
needs: [release]
runs-on: ubuntu-latest
container:
image: fedora:35
image: fedora:36
options: --security-opt seccomp=unconfined
steps:
- name: Install dependencies
Expand All @@ -362,7 +364,7 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v1
with:
name: fedora-35-latest
name: fedora-36-latest

- name: Update repository
env:
Expand All @@ -376,8 +378,8 @@ jobs:
git clone -b "${BRANCH_STAGING}" "${repo}" repo
# copy packages
cp fedora-35-latest/* repo/fedora/f35
cd repo/fedora/f35
cp fedora-36-latest/* repo/fedora/f36
cd repo/fedora/f36
# parse git tag from ref
GIT_TAG=$(echo $GIT_REF | sed 's|^refs/tags/||g')
Expand All @@ -396,14 +398,16 @@ jobs:
update_branch="${BRANCH_STAGING}-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)"
git checkout -b "${update_branch}"
git add .
git commit -m "Update Fedora 35 DTX daemon"
git commit -m "Update Fedora 36 DTX daemon"
git push --set-upstream origin "${update_branch}"
repo-f34:
name: Update Fedora 34 package repository
repo-f35:
name: Update Fedora 35 package repository
needs: [release]
runs-on: ubuntu-latest
container: fedora:34
container:
image: fedora:35
options: --security-opt seccomp=unconfined
steps:
- name: Install dependencies
run: |
Expand All @@ -412,7 +416,7 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v1
with:
name: fedora-34-latest
name: fedora-35-latest

- name: Update repository
env:
Expand All @@ -426,8 +430,8 @@ jobs:
git clone -b "${BRANCH_STAGING}" "${repo}" repo
# copy packages
cp fedora-34-latest/* repo/fedora/f34
cd repo/fedora/f34
cp fedora-35-latest/* repo/fedora/f35
cd repo/fedora/f35
# parse git tag from ref
GIT_TAG=$(echo $GIT_REF | sed 's|^refs/tags/||g')
Expand All @@ -446,14 +450,14 @@ jobs:
update_branch="${BRANCH_STAGING}-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)"
git checkout -b "${update_branch}"
git add .
git commit -m "Update Fedora 34 DTX daemon"
git commit -m "Update Fedora 35 DTX daemon"
git push --set-upstream origin "${update_branch}"
repo-f33:
name: Update Fedora 33 package repository
repo-f34:
name: Update Fedora 34 package repository
needs: [release]
runs-on: ubuntu-latest
container: fedora:33
container: fedora:34
steps:
- name: Install dependencies
run: |
Expand All @@ -462,7 +466,7 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v1
with:
name: fedora-33-latest
name: fedora-34-latest

- name: Update repository
env:
Expand All @@ -476,8 +480,8 @@ jobs:
git clone -b "${BRANCH_STAGING}" "${repo}" repo
# copy packages
cp fedora-33-latest/* repo/fedora/f33
cd repo/fedora/f33
cp fedora-34-latest/* repo/fedora/f34
cd repo/fedora/f34
# parse git tag from ref
GIT_TAG=$(echo $GIT_REF | sed 's|^refs/tags/||g')
Expand All @@ -496,5 +500,5 @@ jobs:
update_branch="${BRANCH_STAGING}-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)"
git checkout -b "${update_branch}"
git add .
git commit -m "Update Fedora 33 DTX daemon"
git commit -m "Update Fedora 34 DTX daemon"
git push --set-upstream origin "${update_branch}"

0 comments on commit bbf375c

Please sign in to comment.