Publish tarballs monthly #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish tarballs monthly | |
on: | |
schedule: | |
- cron: '0 0 1 * *' | |
workflow_dispatch: | |
env: | |
DEV_SSH_PUBLIC_KEY: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAhL37Q/xX95T3YDGskoZp8LeF/2p3AEPl9kfkLqYms9 GitHub Actions | |
jobs: | |
tarball: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
recipe: | |
- base | |
- buildkit | |
- cinnamon | |
- container | |
- gnome | |
- kde | |
- mate | |
- server | |
- xfce | |
buildbot: | |
- Ry3950X | |
- kp920 | |
- powernv | |
- Resonance | |
include: | |
- buildbot: Ry3950X | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: base+nvidia | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: base+nvidia340 | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: base+nvidia390 | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: cinnamon+nvidia | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: cinnamon+nvidia340 | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: cinnamon+nvidia390 | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: gnome+nvidia | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: gnome+nvidia340 | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: gnome+nvidia390 | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: kde+nvidia | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: kde+nvidia340 | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: kde+nvidia390 | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: mate+nvidia | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: mate+nvidia340 | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: mate+nvidia390 | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: xfce+nvidia | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: xfce+nvidia340 | |
architecture: amd64 | |
- buildbot: Ry3950X | |
recipe: xfce+nvidia390 | |
architecture: amd64 | |
- buildbot: kp920 | |
architecture: arm64 | |
- buildbot: powernv | |
architecture: ppc64el | |
- buildbot: Resonance | |
architecture: loongson3 | |
fail-fast: false | |
max-parallel: 1 | |
steps: | |
- name: Install buildbot configurations | |
env: | |
DEV_SSH_PRIVATE_KEY: ${{secrets.DEV_SSH_PRIVATE_KEY}} | |
run: | | |
curl -LSso ~/.ssh/config.d/aosc --create-dirs "https://cdn.jsdelivr.net/gh/AOSC-Dev/Buildbots/ssh_config" | |
curl -LSso ~/.ssh/known_hosts.d/aosc --create-dirs "https://cdn.jsdelivr.net/gh/AOSC-Dev/Buildbots/ssh_known_hosts" | |
cat << EOF >> ~/.ssh/config | |
Host * | |
Include config.d/* | |
EOF | |
echo $DEV_SSH_PRIVATE_KEY | base64 -d > ~/.ssh/id_ed25519 | |
echo $DEV_SSH_PUBLIC_KEY > ~/.ssh/id_ed25519.pub | |
chmod 644 ~/.ssh/config ~/.ssh/config.d/aosc | |
chmod 600 ~/.ssh/id_ed25519 | |
- name: Build and download tarball from buildbot | |
env: | |
RECIPE: ${{matrix.recipe}} | |
BUILDBOT: ${{matrix.buildbot}} | |
ARCH: ${{matrix.architecture}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
run: | | |
ssh -tt $BUILDBOT " | |
set -ex \ | |
&& mkdir -p /buildroots/githubactions/$(echo -n $GITHUB_TOKEN | sha256sum | head -c 8) \ | |
&& cd /buildroots/githubactions/$(echo -n $GITHUB_TOKEN | sha256sum | head -c 8) \ | |
&& generate-releases $RECIPE" | |
sftp $BUILDBOT << EOF | |
get -R /buildroots/githubactions/$(echo -n $GITHUB_TOKEN | sha256sum | head -c 8)/os-$ARCH | |
EOF | |
- name: Upload tarball | |
uses: actions/upload-artifact@v3 | |
with: | |
name: os-${{matrix.architecture}}_${{matrix.recipe}} | |
path: os-${{matrix.architecture}}/${{matrix.recipe}} | |
if-no-files-found: error | |
- name: Remove artifact | |
env: | |
BUILDBOT: ${{matrix.buildbot}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
if: always() | |
run: ssh $BUILDBOT "rm -r /buildroots/githubactions/$(echo -n $GITHUB_TOKEN | sha256sum | head -c 8)" |