forked from cli/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (62 loc) · 2.17 KB
/
linux.yml
File metadata and controls
65 lines (62 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: linux repositories
on:
push:
tags:
- "repos-rc*"
# [x] generate new GPG key and get it into secrets
# - TODO test key flow
# TODO get site repo checked out
# TODO add packages to site, commit, push
jobs:
repos:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get package artifacts
uses: i3h/download-release-asset@v1
with:
owner: cli
repo: cli
tag: latest
file: .*.deb
- name: debug
run: ls *.deb
- name: get blobxfer
uses: i3h/download-release-asset@v1
with:
owner: azure
repo: blobxfer
tag: latest
file: "blobxfer-1.9.4-linux-x86_64"
- name: prepare blobxfer
run: |
mv blobxfer-1.9.4-linux-x86_64 blobxfer
chmod +x blobxfer
- name: install reprepro
run: sudo apt-get install -y reprepro
- name: run reprepro
run: |
echo "Importing pubkey..."
cat script/pubkey.asc | gpg --import --no-tty --batch --yes
echo "Importing seckey..."
echo ${{secrets.GPG_KEY}} | base64 -d | gpg --import --no-tty --batch --yes
echo "Listing public keys..."
gpg --list-keys --with-keygrip
echo "Listing secret keys..."
gpg --list-secret-keys
echo "Resetting gpg-agent and ingesting passphrase"
echo "allow-preset-passphrase" > ~/.gnupg/gpg-agent.conf
gpg-connect-agent RELOADAGENT /bye
echo ${{secrets.GPG_PASSPHRASE}} | /usr/lib/gnupg2/gpg-preset-passphrase --preset gh:ppp
echo "Moving on to reprepro..."
mkdir upload
for file in *.deb ; do /usr/bin/reprepro --confdir="+b/script" includedeb stable $file ; done
- name: "Select repo artifacts"
# Select only final repo artifacts
# (this makes reprepro runs stateless)
run: cp -a dists/ pool/ upload/
- name: upload to blob storage
run: ./blobxfer upload --local-path upload/ --storage-account focusedelgamal --remote-path '$web'
env:
BLOBXFER_STORAGE_ACCOUNT_KEY: ${{secrets.AZURE_STORAGE_KEY}}