-
Notifications
You must be signed in to change notification settings - Fork 3
105 lines (88 loc) · 3.61 KB
/
build-and-deploy.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Deploy
on:
push:
branches: [ 'adoptium' ] # Run on pushes to main adoptium only
schedule:
- cron: '0 3 * * *' # Scheduled runs every day at 3am UTC
jobs:
build-and-deploy:
runs-on: ubuntu-latest # github runners.
steps:
- name: Install dependencies
run: |
echo 'man-db man-db/auto-update boolean false' | sudo debconf-set-selections
sudo apt-get -q -y update
sudo apt-get -q -y install devscripts debhelper dput reprepro eatmydata parallel
env:
DEBIAN_FRONTEND: noninteractive
- name: Clone and checkout this repo
uses: actions/checkout@v3
with:
path: src
- name: Set up Node.js 16
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Import GPG key from GitHub secrets
id: import_gpg
uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549 # v5.2.0 # https://github.com/crazy-max/ghaction-import-gpg/releases
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Build Source and Binary packages for Adoptium
working-directory: src
run: ./build.sh
env:
# key comment "name (comment)", if any, is required by dpkg tooling
PACKAGE_SIGNER_NAME: "${{ steps.import_gpg.outputs.name }} (Used for package signing)"
PACKAGE_SIGNER_EMAIL: ${{ steps.import_gpg.outputs.email }}
RUN_GENERATOR: 1
- name: Test install adoptium-17-jre-hotspot vs debian:stable (amd64)
working-directory: src
run: ./test.sh
env:
VERSION: adoptium-17-jre-hotspot
TEST_IMAGE: debian:stable
- name: Test install adoptium-17-jdk-hotspot vs debian:stable (amd64)
working-directory: src
run: ./test.sh
env:
VERSION: adoptium-17-jdk-hotspot
TEST_IMAGE: debian:stable
- name: Test install adoptium-21-jdk-hotspot vs debian:stable (amd64)
working-directory: src
run: ./test.sh
env:
VERSION: adoptium-21-jdk-hotspot
TEST_IMAGE: debian:stable
- name: Test install adoptium-8-jre-hotspot vs ubuntu:rolling (amd64)
working-directory: src
run: ./test.sh
env:
VERSION: adoptium-8-jdk-hotspot
TEST_IMAGE: ubuntu:rolling
- name: Checkout GitHub pages repo
uses: actions/checkout@v3 # https://github.com/actions/checkout#usage
with:
repository: rpardini/adoptium-deb-installer
ref: "repo-adoptium" # branch
path: src/repo
- name: Configure git identity for apt repo repo
working-directory: src/repo
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Deploy source packages to Launchpad and binaries to apt repo
working-directory: src
run: ./publish.sh
env:
PUSH_APT_REPO: 1 # using reprepro, and the keyid in PACKAGE_SIGNER_KEYID
CLEAN_APT_REPO: 0 # 1 will start the apt repo from scratch
UPLOAD_LAUNCHPAD: 1 # using dput; packages have to be signed
PACKAGE_SIGNER_KEYID: ${{ steps.import_gpg.outputs.keyid }} # key reference, used by reprepro
- name: Show GPG user IDs
run: |
echo "fingerprint: ${{ steps.import_gpg.outputs.fingerprint }}"
echo "keyid: ${{ steps.import_gpg.outputs.keyid }}"
echo "name: ${{ steps.import_gpg.outputs.name }}"
echo "email: ${{ steps.import_gpg.outputs.email }}"