Skip to content

...

... #97

Workflow file for this run

name: stable build
on:
push:
branches: [ stable ]
schedule:
- cron: '27 1 3 * *' # monthly build on 1st of each month, 1:27AM
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
distrib: [ debian, fedora, ubuntu ]
steps:
- name: Checkout packages
uses: actions/checkout@v4
with:
ref: "stable"
- name: Checkout builder script
uses: actions/checkout@v4
with:
repository: jbigot/pkg_builder
path: pkg_builder
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install deps
run: |
#echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
#curl -o - https://www.aptly.info/pubkey.txt | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/aptly.gpg > /dev/null
#echo "deb http://repo.aptly.info/ squeeze main" | sudo tee /etc/apt/sources.list.d/aptly.list
#sudo apt-get update
#sudo apt-get upgrade
#sudo apt-get install devscripts equivs aptly
#pip3.8 install -r pkg_builder/requirements.txt
- name: Build packages
env:
KEY_PASSPHRASE: ${{ secrets.KEY_PASSPHRASE }}
DISTRIB: ${{ matrix.distrib }}
run: |
#python3.8 pkg_builder/pkgbuild -D ${DISTRIB} -j 3 -p "${KEY_PASSPHRASE}"
mkdir ${DISTRIB}
echo "test ${DISTRIB}" > ${DISTRIB}/index.html
- name: Upload artifact
uses: actions/upload-artifact@v4
id: artifact
with:
name: ${{ matrix.distrib }}
path: ./${{ matrix.distrib }}
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Make artifact descriptor container
env:
DISTRIB: ${{ matrix.distrib }}
ARTIFACT: ${{ steps.artifact.output.artifact-url }}
run: |
echo artifact-url: "${ARTIFACT}"
echo artifact-url2: "${{ steps.artifact.output.artifact-url }}"
echo "${ARTIFACT}" > artifact.url
tar -c artifact.url | docker import - ghcr.io/pdidev/pkgs/lastbuild:${DISTRIB}
docker push ghcr.io/pdidev/pkgs/lastbuild:${DISTRIB}
- name: Aggregate sources
run: |
mkdir _site
mv README.tpl/index.html _site
cd _site
for DISTRIB in debian fedora ubuntu
do
CID="$(docker create ghcr.io/pdidev/pkgs/lastbuild:debian /bin/bash)"
URL="$(docker cp "${CID}:artifact.url" -)"
echo curl "${URL}"
curl "${URL}" | tar -x
done
- name: Upload page artifact
uses: actions/upload-pages-artifact@v3
publish:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4