-
-
Notifications
You must be signed in to change notification settings - Fork 76
62 lines (54 loc) · 2.02 KB
/
cacert-publish.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
name: Publish ca-certificates
on:
push:
branches: [ master ]
paths:
- 'linux/ca-certificates/**'
- '.github/workflows/cacert-publish.yml'
permissions:
contents: read
jobs:
publish-ca-certificates:
if: github.repository == 'adoptium/installer'
name: "Publish ca-certificates"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./linux
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0
with:
java-version: '17'
java-package: jdk
architecture: x64
distribution: 'temurin'
- uses: jfrog/setup-jfrog-cli@v3
env:
JF_URL: https://adoptium.jfrog.io
JF_USER: ${{ secrets.ARTIFACTORY_USER }}
JF_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
- name: Build
run: |
export _JAVA_OPTIONS="-Xmx4G"
./gradlew --parallel :ca-certificates:package --stacktrace
- name: Check if deb file exists in Artifactory
id: check-deb
run: |
FILE=$(ls ca-certificates/debian/build/ospackage/*.deb)
echo "File to upload: ${FILE}"
if jf rt s "deb/pool/main/a/adoptium-ca-certificates/$(basename $FILE)" > /dev/null; then
echo file_exists=true >> "$GITHUB_OUTPUT"
else
echo file_exists=false >> "$GITHUB_OUTPUT"
fi
- name: Upload deb file to Artifactory
if: steps.check-deb.outputs.file_exists == 'false'
run: |
debVersionList=("bookworm" "bullseye" "buster" "kinetic" "jammy" "focal" "bionic")
for debVersion in "${debVersionList[@]}"; do
distroList+="deb.distribution=${debVersion};"
done
FILE=$(ls ca-certificates/debian/build/ospackage/*.deb)
jf rt u "$FILE" "deb/pool/main/a/adoptium-ca-certificates/$(basename ${FILE});deb.architecture=all;deb.component=main;${distroList}"