-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install build tools | ||
run: sudo apt-get update && sudo apt-get install debhelper build-essential devscripts gcc-multilib binutils-dev pkg-config uuid-dev help2man gnu-efi -y | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
|
||
- name: Build package | ||
run: |+ | ||
debuild -i -uc -us -b | ||
cd .. | ||
echo "Result: $(ls *.deb)" | ||
sha512sum *.deb > checksums.txt | ||
cp *.deb checksums.txt ${{ github.workspace }}/ | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
- name: Store package | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: deb-package | ||
path: | | ||
*.deb | ||
checksums.txt | ||
retention-days: 10 | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # to get commit messages | ||
submodules: recursive | ||
|
||
- name: Fetch Tags | ||
run: git fetch --force --tags | ||
|
||
- name: Install build tools | ||
run: sudo apt-get update && sudo apt-get install debhelper build-essential devscripts gcc-multilib binutils-dev pkg-config uuid-dev help2man gnu-efi -y | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
|
||
- name: Build package | ||
run: |+ | ||
debuild -i -uc -us -b | ||
cd .. | ||
echo "Result: $(ls *.deb)" | ||
sha512sum *.deb > checksums.txt | ||
cp *.deb checksums.txt ${{ github.workspace }}/ | ||
gh release delete $TAG || true | ||
gh release create $TAG --generate-notes ../*.deb ../checksums.txt | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
deploy: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
version: [jammy] # add others, if same package should be available in many versions | ||
steps: | ||
- name: Deploy | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.PULL_TOKEN }} | ||
script: |+ | ||
github.rest.actions.createWorkflowDispatch({ | ||
owner: 'telekom-mms', | ||
repo: 'linux-apt', | ||
workflow_id: 'do_pull.yml', | ||
ref: 'main', | ||
inputs: { | ||
repo: 'tpmsbsigntool', | ||
version: '${{ matrix.version }}', | ||
tag: '${{ github.ref_name }}' | ||
} | ||
}); | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
build/ | ||
*.build | ||
*.buildinfo | ||
*.changes | ||
*.deb | ||
*.ddeb |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM ghcr.io/malaupa/ubuntu-deb-builder:latest | ||
ARG USER_ID | ||
|
||
RUN useradd user -u ${USER_ID} | ||
RUN set -eu ; \ | ||
export DEBIAN_FRONTEND=noninteractive ; \ | ||
apt-get update -y && \ | ||
apt-get install --no-install-recommends -y \ | ||
gcc-multilib \ | ||
binutils-dev \ | ||
pkg-config \ | ||
uuid-dev \ | ||
help2man \ | ||
gnu-efi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/bash | ||
[[ -d "build" ]] && rm -rf build | ||
mkdir build | ||
shopt -s extglob | ||
cp -R !(build) build | ||
docker build --rm -t tpmsbsigntool-builder --build-arg="USER_ID=$UID" . | ||
docker run --user=$UID --rm -v ./:/work tpmsbsigntool-builder /usr/bin/bash -c "cd /work/build && debuild -i -uc -us -b" | ||
rm -rf build | ||
rm *.build | ||
rm *.buildinfo | ||
rm *.changes | ||
rm *.ddeb |