Bump actions/checkout from 3.6.0 to 4.0.0 (#731) #14
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
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@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0 | |
with: | |
java-version: '17' | |
java-package: jdk | |
architecture: x64 | |
distribution: 'temurin' | |
- uses: jfrog/setup-jfrog-cli@2d55dc43e261c3d0bd1abfe457fce4d839e83b49 # v3.4.0 | |
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}" --flat=true |