|
| 1 | +name: Publish to Unstable |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - main |
| 8 | + |
| 9 | +concurrency: |
| 10 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 11 | + cancel-in-progress: true |
| 12 | + |
| 13 | +jobs: |
| 14 | + matrix-builder: |
| 15 | + runs-on: ubuntu-24.04 |
| 16 | + outputs: |
| 17 | + includes: ${{ steps.builder.outputs.includes }} |
| 18 | + runners: ${{ steps.builder.outputs.runners }} |
| 19 | + steps: |
| 20 | + - name: Build Matrix |
| 21 | + id: builder |
| 22 | + uses: regolith-linux/actions/build-matrix@main |
| 23 | + with: |
| 24 | + name: "${{ github.event.repository.name }}" |
| 25 | + ref: "${{ github.ref_name }}" |
| 26 | + arch: "amd64 arm64" |
| 27 | + stage: "unstable" |
| 28 | + |
| 29 | + build: |
| 30 | + runs-on: ${{ fromJSON(needs.matrix-builder.outputs.runners)[matrix.arch] }} |
| 31 | + needs: matrix-builder |
| 32 | + container: "ghcr.io/regolith-linux/ci-${{ matrix.distro }}:${{ matrix.codename }}-${{ matrix.arch }}" |
| 33 | + strategy: |
| 34 | + fail-fast: false |
| 35 | + matrix: |
| 36 | + include: ${{ fromJSON(needs.matrix-builder.outputs.includes) }} |
| 37 | + env: |
| 38 | + server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}" |
| 39 | + server-username: "${{ secrets.KAMATERA_USERNAME }}" |
| 40 | + steps: |
| 41 | + - name: Checkout |
| 42 | + uses: actions/checkout@v4 |
| 43 | + |
| 44 | + - name: Import GPG Key |
| 45 | + uses: regolith-linux/actions/import-gpg@main |
| 46 | + with: |
| 47 | + gpg-key: "${{ secrets.PACKAGE_PRIVATE_KEY2 }}" |
| 48 | + |
| 49 | + - name: Build Package |
| 50 | + id: build |
| 51 | + uses: regolith-linux/actions/build-package@main |
| 52 | + with: |
| 53 | + name: "${{ github.event.repository.name }}" |
| 54 | + distro: "${{ matrix.distro }}" |
| 55 | + codename: "${{ matrix.codename }}" |
| 56 | + stage: "unstable" |
| 57 | + suite: "unstable" |
| 58 | + component: "main" |
| 59 | + arch: "${{ matrix.arch }}" |
| 60 | + |
| 61 | + - name: Setup SSH |
| 62 | + uses: regolith-linux/actions/setup-ssh@main |
| 63 | + with: |
| 64 | + ssh-host: "${{ env.server-address }}" |
| 65 | + ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}" |
| 66 | + |
| 67 | + - name: Upload Package |
| 68 | + uses: regolith-linux/actions/upload-files@main |
| 69 | + with: |
| 70 | + upload-to-folder: "${{ github.event.repository.name }}" |
| 71 | + |
| 72 | + - name: Upload SourceLog |
| 73 | + uses: regolith-linux/actions/upload-files@main |
| 74 | + with: |
| 75 | + upload-from: "${{ steps.build.outputs.buildlog-path }}" |
| 76 | + upload-pattern: "SOURCELOG_*.txt" |
| 77 | + upload-to-base: "/opt/archives/workspace/" |
| 78 | + upload-to-folder: "${{ github.event.repository.name }}" |
| 79 | + |
| 80 | + sources: |
| 81 | + runs-on: ubuntu-24.04 |
| 82 | + needs: build |
| 83 | + container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64" |
| 84 | + if: ${{ !failure() && !cancelled() }} |
| 85 | + env: |
| 86 | + server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}" |
| 87 | + server-username: "${{ secrets.KAMATERA_USERNAME }}" |
| 88 | + steps: |
| 89 | + - name: Import GPG Key |
| 90 | + uses: regolith-linux/actions/import-gpg@main |
| 91 | + with: |
| 92 | + gpg-key: "${{ secrets.PACKAGE_PRIVATE_KEY2 }}" |
| 93 | + |
| 94 | + - name: Setup SSH |
| 95 | + uses: regolith-linux/actions/setup-ssh@main |
| 96 | + with: |
| 97 | + ssh-host: "${{ env.server-address }}" |
| 98 | + ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}" |
| 99 | + |
| 100 | + - name: Rebuild Sources |
| 101 | + uses: regolith-linux/actions/rebuild-sources@main |
| 102 | + with: |
| 103 | + workspace-subfolder: "${{ github.event.repository.name }}" |
| 104 | + only-component: "unstable" |
| 105 | + only-package: "${{ github.event.repository.name }}" |
| 106 | + |
| 107 | + publish: |
| 108 | + runs-on: ubuntu-24.04 |
| 109 | + needs: sources |
| 110 | + container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64" |
| 111 | + if: ${{ !failure() && !cancelled() }} |
| 112 | + env: |
| 113 | + server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}" |
| 114 | + server-username: "${{ secrets.KAMATERA_USERNAME }}" |
| 115 | + steps: |
| 116 | + - name: Setup SSH |
| 117 | + uses: regolith-linux/actions/setup-ssh@main |
| 118 | + with: |
| 119 | + ssh-host: "${{ env.server-address }}" |
| 120 | + ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}" |
| 121 | + |
| 122 | + - name: Publish Repo |
| 123 | + uses: regolith-linux/actions/publish-repo@main |
| 124 | + with: |
| 125 | + packages-path-subfolder: "${{ github.event.repository.name }}" |
| 126 | + only-component: "unstable" |
| 127 | + |
| 128 | + manifests: |
| 129 | + runs-on: ubuntu-24.04 |
| 130 | + needs: [matrix-builder, publish] |
| 131 | + container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64" |
| 132 | + if: ${{ !failure() && !cancelled() }} |
| 133 | + steps: |
| 134 | + - name: Update Manifests |
| 135 | + uses: regolith-linux/actions/update-manifest@main |
| 136 | + env: |
| 137 | + GITHUB_TOKEN: ${{ secrets.ORG_BROADCAST_TOKEN2 }} |
| 138 | + with: |
| 139 | + name: "${{ github.event.repository.name }}" |
| 140 | + repo: "${{ github.server_url }}/${{ github.repository }}.git" |
| 141 | + ref: "${{ github.ref_name }}" |
| 142 | + sha: "${{ github.sha }}" |
| 143 | + matrix: "${{ needs.matrix-builder.outputs.includes }}" |
| 144 | + suite: "unstable" |
| 145 | + component: "main" |
0 commit comments