|
| 1 | +name: linux repositories |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - "repos-rc*" |
| 7 | + |
| 8 | +# TODO get gpg secrets in place |
| 9 | + |
| 10 | +jobs: |
| 11 | + repos: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - name: Checkout |
| 15 | + uses: actions/checkout@v2 |
| 16 | + - name: Get package artifacts |
| 17 | + with: |
| 18 | + uses: i3h/download-release-asset@v1 |
| 19 | + owner: cli |
| 20 | + repo: cli |
| 21 | + tag: latest |
| 22 | + file: .\*.deb |
| 23 | + - name: debug |
| 24 | + run: ls \*.deb |
| 25 | + - name: get blobxfer |
| 26 | + with: |
| 27 | + uses: i3h/download-release-asset@v1 |
| 28 | + owner: azure |
| 29 | + repo: blobxfer |
| 30 | + tag: latest |
| 31 | + file: "blobxfer-1.9.4-linux-x86_64" |
| 32 | + - name: prepare blobxfer |
| 33 | + run: | |
| 34 | + mv blobxfer-1.9.4-linux-x86_64 blobxfer |
| 35 | + chmod +x blobxfer |
| 36 | + - name: install reprepro |
| 37 | + run: sudo apt-get install -y reprepro |
| 38 | + - name: run reprepro |
| 39 | + run: | |
| 40 | + echo "Importing pubkey..." |
| 41 | + cat conf/pubkey.asc | gpg --import --no-tty --batch --yes |
| 42 | + echo "Importing seckey..." |
| 43 | + echo ${{secrets.GPG_KEY}} | base64 -d | gpg --import --no-tty --batch --yes |
| 44 | + echo "Listing public keys..." |
| 45 | + gpg --list-keys --with-keygrip |
| 46 | + echo "Listing secret keys..." |
| 47 | + gpg --list-secret-keys |
| 48 | + echo "Resetting gpg-agent and ingesting passphrase" |
| 49 | + echo "allow-preset-passphrase" > ~/.gnupg/gpg-agent.conf |
| 50 | + gpg-connect-agent RELOADAGENT /bye |
| 51 | + echo ${{secrets.GPG_PASSPHRASE}} | /usr/lib/gnupg2/gpg-preset-passphrase --preset 6D05600E91B6B2104C6E291A2072C6F511C291AE |
| 52 | + echo "Moving on to reprepro..." |
| 53 | + mkdir upload |
| 54 | + for file in \*.deb ; do /usr/bin/reprepro includedeb stable $file ; done |
| 55 | + |
| 56 | + - name: "Select repo artifacts" |
| 57 | + # Select only final repo artifacts |
| 58 | + # (this makes reprepro runs stateless) |
| 59 | + - run: cp -a dists/ pool/ upload/ |
| 60 | + - name: upload to blob storage |
| 61 | + run: ./blobxfer upload --local-path upload/ --storage-account focusedelgamal --rmote-path '$web' |
| 62 | + env: |
| 63 | + BLOBXFER_STORAGE_ACCOUNT_KEY: ${{secrets.AZURE_STORAGE_KEY}} |
0 commit comments