Skip to content

Commit 627dc96

Browse files
Create publish-trixie.yml
1 parent dadb7ee commit 627dc96

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish debian trixie packages
2+
3+
on:
4+
- workflow_dispatch
5+
6+
jobs:
7+
publish-trixie:
8+
runs-on: ubuntu-latest
9+
container:
10+
image: debian:trixie
11+
steps:
12+
- name: Install repo
13+
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get --yes install wget && wget -O key.deb https://deb1.ws.maxmaton.nl/key.deb && DEBIAN_FRONTEND=noninteractive apt-get --yes install ./key.deb && echo "deb [signed-by=/usr/share/keyrings/maxmaton.gpg] http://deb.maxmaton.nl/debian trixie main non-free" > /etc/apt/sources.list.d/maxmaton.list
14+
- name: Install dependencies
15+
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get --yes install git build-essential gem scrypt sshpass gem2deb ruby-actionpack ruby-activesupport
16+
- uses: actions/checkout@v3
17+
name: Check out repository
18+
- name: Build gem
19+
run: |
20+
git config --global --add safe.directory "$(pwd)"
21+
sed -i -re "s/VERSION\s+=\s+'([0-9]+.[0-9]+.[0-9]+)'/VERSION = '\1.trixie'/g" lib/media_types/version.rb
22+
gem build media_types.gemspec
23+
- name: Build deb
24+
run: [email protected] gem2deb media_types-*.gem && ls -hal
25+
- name: Publish
26+
env:
27+
PUBLISH_SIGNING_KEY: ${{ secrets.PUBLISH_SIGNING_KEY }}
28+
SSHPASS: ${{ secrets.SSHPASS }}
29+
run: |
30+
echo "deb1.ws.maxmaton.nl ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDgN3TiyKvRTj4xBSyQtYz0OuHZYv2i+x3NL+svh2k0SgPr0Xms4Vu+g3AXntXUQGRM0W9zbcZSHiBIWbliv3Y+20f7lKlj9uXUEMHDuiB7Fu7dXObfHswIvTX3XWiPdDeG1jYQbGM3tENX/wtEoixyL++33O69t2SFR5MkPk+/j+zlGLCFf0ypTAMb7bT5NjRNM3+v0LT2WVSZuawA7Fl8WBVTq7MSSuCZIxHIv1kEq6AWpOjWZHNVZrijs+uRTIPcrZ47wSt6tanjAnWT9sAzu8KqcvQsPw9IQwqV1nfQWz0wMit7ijn9B3MrkNHXP5PaNiZQCezsbrh9glhShz0z" > known_hosts
31+
echo "deb1.ws.maxmaton.nl ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBMr5uAraiRj0pQ9Q9dQO0xMosTzFUAe+VjtMclIUbdJ7r7XMUa3etxh3BfBlW4nq3ZdIFCsV2zwzTaYSmfh95Xs=" >> known_hosts
32+
echo "deb1.ws.maxmaton.nl ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPhQl7Ik6h7hSQbdo9ZfF78WYFCzch8SAOXFBxxAZH06" >> known_hosts
33+
echo "Uploading :" ruby-media-types_*.deb
34+
scrypt enc --passphrase "env:PUBLISH_SIGNING_KEY" ruby-media-types_*.deb | sshpass -e ssh -o "UserKnownHostsFile=known_hosts" [email protected] "echo 'uploading trixie' && sudo /opt/max/publish-deb ruby-media-types trixie main && echo 'trixie done'"

0 commit comments

Comments
 (0)