Deploy #824
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: 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 }}" | |