|
| 1 | +name: installer |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [master] |
| 6 | + pull_request: |
| 7 | + branches: [master] |
| 8 | + paths: |
| 9 | + - ".github/workflows/installer.yml" |
| 10 | + - "installer/**" |
| 11 | + |
| 12 | +concurrency: |
| 13 | + cancel-in-progress: true |
| 14 | + group: ${{ github.workflow }}-${{ github.ref_protected && github.run_id || github.event.pull_request.number }} |
| 15 | + |
| 16 | +permissions: # added using https://github.com/step-security/secure-workflows |
| 17 | + contents: read |
| 18 | + |
| 19 | +jobs: |
| 20 | + make_installer: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + steps: |
| 23 | + # See https://docs.stepsecurity.io/harden-runner/getting-started/ for instructions on |
| 24 | + # configuring harden-runner and identifying allowed endpoints. |
| 25 | + - name: Harden Runner |
| 26 | + uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2 |
| 27 | + with: |
| 28 | + egress-policy: block |
| 29 | + allowed-endpoints: > |
| 30 | + *-docker.pkg.dev:443 |
| 31 | + *.cloudfront.net:443 |
| 32 | + azure.archive.ubuntu.com:80 |
| 33 | + cdn.dl.k8s.io:443 |
| 34 | + dl.k8s.io:443 |
| 35 | + esm.ubuntu.com:443 |
| 36 | + files.pythonhosted.org:443 |
| 37 | + get.helm.sh:443 |
| 38 | + get.k3s.io:443 |
| 39 | + github.com:443 |
| 40 | + kubernetes.github.io:443 |
| 41 | + packages.microsoft.com:443 |
| 42 | + prod-registry-k8s-io-us-east-1.s3.dualstack.us-east-1.amazonaws.com:443 |
| 43 | + prod-registry-k8s-io-us-east-2.s3.dualstack.us-east-2.amazonaws.com:443 |
| 44 | + prod-registry-k8s-io-us-west-1.s3.dualstack.us-west-1.amazonaws.com:443 |
| 45 | + prod-registry-k8s-io-us-west-2.s3.dualstack.us-west-2.amazonaws.com:443 |
| 46 | + public.ecr.aws:443 |
| 47 | + pypi.org:443 |
| 48 | + registry.k8s.io:443 |
| 49 | + release-assets.githubusercontent.com:443 |
| 50 | + - name: Checkout repository |
| 51 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 52 | + with: |
| 53 | + fetch-depth: 0 |
| 54 | + - name: Install dependencies |
| 55 | + run: | |
| 56 | + sudo apt-get update |
| 57 | + sudo apt-get install -y makeself |
| 58 | + shell: bash |
| 59 | + - name: Make installer with --net-install |
| 60 | + run: | |
| 61 | + cd installer |
| 62 | + ./make-combine-installer.sh --net-install --debug |
| 63 | + shell: bash |
| 64 | + - name: Make installer with release version |
| 65 | + run: | |
| 66 | + cd installer |
| 67 | + ./make-combine-installer.sh $(git describe --tags --abbrev=0) --debug |
| 68 | + shell: bash |
| 69 | + - name: Show size of installer files |
| 70 | + run: | |
| 71 | + cd installer |
| 72 | + du -sh * |
| 73 | + shell: bash |
| 74 | + |
| 75 | + make_readme: |
| 76 | + runs-on: ubuntu-latest |
| 77 | + steps: |
| 78 | + # See https://docs.stepsecurity.io/harden-runner/getting-started/ for instructions on |
| 79 | + # configuring harden-runner and identifying allowed endpoints. |
| 80 | + - name: Harden Runner |
| 81 | + uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2 |
| 82 | + with: |
| 83 | + egress-policy: block |
| 84 | + allowed-endpoints: > |
| 85 | + azure.archive.ubuntu.com:80 |
| 86 | + esm.ubuntu.com:443 |
| 87 | + github.com:443 |
| 88 | + packages.microsoft.com:443 |
| 89 | + - name: Checkout repository |
| 90 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 91 | + - name: Install dependencies |
| 92 | + run: | |
| 93 | + sudo apt-get update |
| 94 | + sudo apt-get install -y pandoc weasyprint |
| 95 | + shell: bash |
| 96 | + - name: Generate README PDF |
| 97 | + run: | |
| 98 | + cd installer |
| 99 | + pandoc --pdf-engine=weasyprint --metadata title="The Combine Installation Instructions" README.md -o README.pdf |
| 100 | + shell: bash |
0 commit comments