Experiment with building the .deb packages.
Innernet no longer builds the .deb packages, so this repository is meaningless as-is.pull/1/head
parent
d789ee7fb7
commit
bc0eef18dd
|
@ -4,9 +4,9 @@ name: Update Repository
|
||||||
|
|
||||||
# Controls when the workflow will run
|
# Controls when the workflow will run
|
||||||
on:
|
on:
|
||||||
push:
|
#push:
|
||||||
# If the configuration has changed, this ensures we apply updates.
|
# If the configuration has changed, this ensures we apply updates.
|
||||||
branches: [ main ]
|
#branches: [ main ]
|
||||||
|
|
||||||
schedule:
|
schedule:
|
||||||
# Upstream releases around once per month, so twice a week should be fine.
|
# Upstream releases around once per month, so twice a week should be fine.
|
||||||
|
@ -14,22 +14,66 @@ on:
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
||||||
jobs:
|
jobs:
|
||||||
# This workflow contains a single job called "build"
|
build-deb:
|
||||||
build:
|
name: Build DEB Packages
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
- name: Install Distro Dependencies
|
||||||
run: sudo env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes gpg jq reprepro
|
run: sudo env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes dpkg-dev liblzma-dev
|
||||||
|
|
||||||
- name: Checkout
|
- name: Download Latest Release
|
||||||
uses: actions/checkout@v2
|
id: download-release
|
||||||
|
run: |
|
||||||
|
wget -O- \
|
||||||
|
-H'Accept: application/json' \
|
||||||
|
"https://api.github.com/repos/tonariono/innernet/releases/latest" \
|
||||||
|
| jq -r '(.name + " " + .tarball_url)' \
|
||||||
|
| (
|
||||||
|
read release tarball_url
|
||||||
|
wget --header='Accept: application/octet-stream' -O- "$tarball_url" | tar xz
|
||||||
|
echo "innernet_release=$release" >>"$GITHUB_OUTPUT"
|
||||||
|
)
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
# See https://github.com/marketplace/actions/github-push
|
profile: minimal
|
||||||
persist-credentials: false
|
override: true
|
||||||
fetch-depth: 0
|
|
||||||
|
- name: Install cargo-deb
|
||||||
|
run: |
|
||||||
|
type -p cargo-deb || cargo install cargo-deb
|
||||||
|
|
||||||
|
- name: Set up Rust Cache
|
||||||
|
uses: Swatinem/rust-cache@v1
|
||||||
|
|
||||||
|
- name: Build Client DEB
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: deb
|
||||||
|
args: -p client
|
||||||
|
|
||||||
|
- name: Build Server DEB
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: deb
|
||||||
|
args: -p server
|
||||||
|
|
||||||
|
- name: Upload DEBs
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: deb-ubuntu-latest
|
||||||
|
path: target/debian/*.deb
|
||||||
|
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build-deb]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install Distro Dependencies
|
||||||
|
run: sudo env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes gpg jq reprepro
|
||||||
|
|
||||||
- name: Set up GPG keys
|
- name: Set up GPG keys
|
||||||
run: |
|
run: |
|
||||||
|
@ -41,7 +85,12 @@ jobs:
|
||||||
echo "${{ secrets.GPG_SIGNING_KEY }}" | gpg --quiet --batch --yes --import
|
echo "${{ secrets.GPG_SIGNING_KEY }}" | gpg --quiet --batch --yes --import
|
||||||
echo '${{ secrets.GPG_SIGNING_PASSPHRASE }}' | /usr/lib/gnupg/gpg-preset-passphrase --preset 57F0E65446A301CC19914FD61167922350A2D8B2
|
echo '${{ secrets.GPG_SIGNING_PASSPHRASE }}' | /usr/lib/gnupg/gpg-preset-passphrase --preset 57F0E65446A301CC19914FD61167922350A2D8B2
|
||||||
|
|
||||||
- name: Download and include package files
|
- name: Get artifacts
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: deb-ubuntu-latest
|
||||||
|
|
||||||
|
- name: Update Repository
|
||||||
run: ./addlatest
|
run: ./addlatest
|
||||||
|
|
||||||
- name: Push changes
|
- name: Push changes
|
||||||
|
|
Loading…
Reference in New Issue