Use new repo-update method for Fedora
This commit is contained in:
parent
66e405c04c
commit
264539bae7
4
.github/workflows/arch.yml
vendored
4
.github/workflows/arch.yml
vendored
|
@ -76,11 +76,11 @@ jobs:
|
||||||
name: Update package repository
|
name: Update package repository
|
||||||
needs: [build]
|
needs: [build]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container: archlinux
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
pacman -Sy --noconfirm git
|
||||||
sudo apt-get install -y git
|
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
|
|
5
.github/workflows/debian.yml
vendored
5
.github/workflows/debian.yml
vendored
|
@ -119,11 +119,12 @@ jobs:
|
||||||
name: Update package repository
|
name: Update package repository
|
||||||
needs: [build]
|
needs: [build]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container: debian:sid
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
apt-get update
|
||||||
sudo apt-get install -y git
|
apt-get install -y git
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
|
|
71
.github/workflows/fedora-30.yml
vendored
71
.github/workflows/fedora-30.yml
vendored
|
@ -66,26 +66,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
dnf install -y createrepo_c git findutils wget
|
dnf install -y git
|
||||||
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: linux-surface/repo
|
|
||||||
token: ${{ secrets.GITHUB_BOT_TOKEN }}
|
|
||||||
fetch-depth: 0
|
|
||||||
ref: master
|
|
||||||
|
|
||||||
- name: Unpack repository
|
|
||||||
run: |
|
|
||||||
cd fedora/f30
|
|
||||||
|
|
||||||
for blob in $(find . -name '*.blob'); do
|
|
||||||
blobref="$(cat $blob)"
|
|
||||||
repo="${blobref%%:*}"
|
|
||||||
vers="${blobref#*:}"
|
|
||||||
wget "https://github.com/linux-surface/$repo/releases/download/$vers"
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
|
@ -94,40 +75,38 @@ jobs:
|
||||||
|
|
||||||
- name: Update repository
|
- name: Update repository
|
||||||
env:
|
env:
|
||||||
GPG_KEY: ${{ secrets.SURFACE_GPG_KEY }}
|
SURFACEBOT_TOKEN: ${{ secrets.GITHUB_BOT_TOKEN }}
|
||||||
|
BRANCH_STAGING: autoupd/staging
|
||||||
GIT_REF: ${{ github.ref }}
|
GIT_REF: ${{ github.ref }}
|
||||||
run: |
|
run: |
|
||||||
# Parse git tag from ref
|
repo="https://surfacebot:${SURFACEBOT_TOKEN}@github.com/linux-surface/repo.git"
|
||||||
|
|
||||||
|
# clone package repository
|
||||||
|
git clone -b "${BRANCH_STAGING}" "${repo}" repo
|
||||||
|
|
||||||
|
# copy packages
|
||||||
|
cp fedora-30-latest/* repo/fedora/f30
|
||||||
|
cd repo/fedora/f30
|
||||||
|
|
||||||
|
# parse git tag from ref
|
||||||
GIT_TAG=$(echo $GIT_REF | sed 's|^refs/tags/||g')
|
GIT_TAG=$(echo $GIT_REF | sed 's|^refs/tags/||g')
|
||||||
|
|
||||||
for pkg in $(find fedora-30-latest -name '*.rpm'); do
|
# convert packages into references
|
||||||
|
for pkg in $(find . -name '*.pkg.tar.zst'); do
|
||||||
echo "linux-surface:$GIT_TAG/$(basename $pkg)" > $pkg.blob
|
echo "linux-surface:$GIT_TAG/$(basename $pkg)" > $pkg.blob
|
||||||
|
rm $pkg
|
||||||
done
|
done
|
||||||
|
|
||||||
cp fedora-30-latest/* fedora/f30/
|
# set git identity
|
||||||
rm -r fedora-30-latest
|
git config --global user.email "surfacebot@users.noreply.github.com"
|
||||||
|
git config --global user.name "surfacebot"
|
||||||
|
|
||||||
cd fedora/f30
|
# commit and push
|
||||||
createrepo_c --xz --update --verbose .
|
update_branch="${BRANCH_STAGING}-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)"
|
||||||
|
git switch -c "${update_branch}"
|
||||||
# Sign the updated repository
|
git add .
|
||||||
echo "$GPG_KEY" | base64 -d | gpg --import --no-tty --batch --yes
|
git commit -m "Update Fedora 30 kernel"
|
||||||
if [ -f 'repodata/repomd.xml.asc' ]; then
|
git push --set-upstream origin "${update_branch}"
|
||||||
rm repodata/repomd.xml.asc
|
|
||||||
fi
|
|
||||||
gpg --detach-sign --batch --no-tty --armor -u $GPG_KEY_ID repodata/repomd.xml
|
|
||||||
|
|
||||||
- name: Commit and push
|
|
||||||
uses: github-actions-x/commit@v2.3
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_BOT_TOKEN }}
|
|
||||||
push-branch: master
|
|
||||||
commit-message: Update f30 kernel
|
|
||||||
force-add: false
|
|
||||||
rebase: true
|
|
||||||
files: fedora/f30/*
|
|
||||||
name: surfacebot
|
|
||||||
email: surfacebot@users.noreply.github.com
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Publish release
|
name: Publish release
|
||||||
|
|
71
.github/workflows/fedora-31.yml
vendored
71
.github/workflows/fedora-31.yml
vendored
|
@ -66,26 +66,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
dnf install -y createrepo_c git findutils wget
|
dnf install -y git
|
||||||
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: linux-surface/repo
|
|
||||||
token: ${{ secrets.GITHUB_BOT_TOKEN }}
|
|
||||||
fetch-depth: 0
|
|
||||||
ref: master
|
|
||||||
|
|
||||||
- name: Unpack repository
|
|
||||||
run: |
|
|
||||||
cd fedora/f31
|
|
||||||
|
|
||||||
for blob in $(find . -name '*.blob'); do
|
|
||||||
blobref="$(cat $blob)"
|
|
||||||
repo="${blobref%%:*}"
|
|
||||||
vers="${blobref#*:}"
|
|
||||||
wget "https://github.com/linux-surface/$repo/releases/download/$vers"
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
|
@ -94,40 +75,38 @@ jobs:
|
||||||
|
|
||||||
- name: Update repository
|
- name: Update repository
|
||||||
env:
|
env:
|
||||||
GPG_KEY: ${{ secrets.SURFACE_GPG_KEY }}
|
SURFACEBOT_TOKEN: ${{ secrets.GITHUB_BOT_TOKEN }}
|
||||||
|
BRANCH_STAGING: autoupd/staging
|
||||||
GIT_REF: ${{ github.ref }}
|
GIT_REF: ${{ github.ref }}
|
||||||
run: |
|
run: |
|
||||||
# Parse git tag from ref
|
repo="https://surfacebot:${SURFACEBOT_TOKEN}@github.com/linux-surface/repo.git"
|
||||||
|
|
||||||
|
# clone package repository
|
||||||
|
git clone -b "${BRANCH_STAGING}" "${repo}" repo
|
||||||
|
|
||||||
|
# copy packages
|
||||||
|
cp fedora-31-latest/* repo/fedora/f31
|
||||||
|
cd repo/fedora/f31
|
||||||
|
|
||||||
|
# parse git tag from ref
|
||||||
GIT_TAG=$(echo $GIT_REF | sed 's|^refs/tags/||g')
|
GIT_TAG=$(echo $GIT_REF | sed 's|^refs/tags/||g')
|
||||||
|
|
||||||
for pkg in $(find fedora-31-latest -name '*.rpm'); do
|
# convert packages into references
|
||||||
|
for pkg in $(find . -name '*.pkg.tar.zst'); do
|
||||||
echo "linux-surface:$GIT_TAG/$(basename $pkg)" > $pkg.blob
|
echo "linux-surface:$GIT_TAG/$(basename $pkg)" > $pkg.blob
|
||||||
|
rm $pkg
|
||||||
done
|
done
|
||||||
|
|
||||||
cp fedora-31-latest/* fedora/f31/
|
# set git identity
|
||||||
rm -r fedora-31-latest
|
git config --global user.email "surfacebot@users.noreply.github.com"
|
||||||
|
git config --global user.name "surfacebot"
|
||||||
|
|
||||||
cd fedora/f31
|
# commit and push
|
||||||
createrepo_c --xz --update --verbose .
|
update_branch="${BRANCH_STAGING}-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)"
|
||||||
|
git switch -c "${update_branch}"
|
||||||
# Sign the updated repository
|
git add .
|
||||||
echo "$GPG_KEY" | base64 -d | gpg --import --no-tty --batch --yes
|
git commit -m "Update Fedora 31 kernel"
|
||||||
if [ -f 'repodata/repomd.xml.asc' ]; then
|
git push --set-upstream origin "${update_branch}"
|
||||||
rm repodata/repomd.xml.asc
|
|
||||||
fi
|
|
||||||
gpg --detach-sign --batch --no-tty --armor -u $GPG_KEY_ID repodata/repomd.xml
|
|
||||||
|
|
||||||
- name: Commit and push
|
|
||||||
uses: github-actions-x/commit@v2.3
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_BOT_TOKEN }}
|
|
||||||
push-branch: master
|
|
||||||
commit-message: Update f31 kernel
|
|
||||||
force-add: false
|
|
||||||
rebase: true
|
|
||||||
files: fedora/f31/*
|
|
||||||
name: surfacebot
|
|
||||||
email: surfacebot@users.noreply.github.com
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Publish release
|
name: Publish release
|
||||||
|
|
Loading…
Reference in a new issue