|
4 | 4 | workflow_dispatch: |
5 | 5 | inputs: |
6 | 6 | config: |
7 | | - description: 'Path to the YAML configuration file' |
| 7 | + description: "Path to the YAML configuration file" |
8 | 8 | required: true |
9 | 9 | type: string |
10 | 10 |
|
| 11 | +permissions: |
| 12 | + contents: read |
| 13 | + id-token: write |
| 14 | + |
11 | 15 | jobs: |
12 | 16 | build: |
13 | 17 | strategy: |
14 | 18 | matrix: |
15 | | - arch: [amd64, arm64] |
16 | | - runs-on: [self-hosted, qcom-u2404, "${{ matrix.arch }}"] |
| 19 | + arch: [arm64] |
| 20 | + runs-on: debian-linux-images--linux-arm64-8core-32gb |
17 | 21 | env: |
18 | 22 | CONFIG: ${{ inputs.config }} |
| 23 | + environment: staging |
19 | 24 | container: |
20 | | - image: public.ecr.aws/debian/debian:trixie |
21 | | - options: --privileged # Required for chroot creation |
| 25 | + image: debian:trixie |
| 26 | + options: --privileged # Required for chroot creation |
22 | 27 | steps: |
23 | 28 | - name: Update OS packages |
24 | 29 | run: | |
|
35 | 40 | set -ux |
36 | 41 | DEBIAN_FRONTEND=noninteractive \ |
37 | 42 | apt -y install --no-install-recommends \ |
38 | | - sudo sbuild gnupg debootstrap debian-archive-keyring schroot |
| 43 | + sudo sbuild gnupg debootstrap debian-archive-keyring schroot awscli |
39 | 44 |
|
40 | 45 | - name: Set up sbuild user |
41 | 46 | run: | |
|
91 | 96 | sudo -u builder python3 scripts/build-deb.py \ |
92 | 97 | --config "$CONFIG" --output-dir upload |
93 | 98 |
|
94 | | - - name: Upload as private artifacts |
95 | | - uses: qualcomm-linux/upload-private-artifact-action@v1 |
| 99 | + - name: Authenticate AWS |
| 100 | + uses: aws-actions/configure-aws-credentials@v4 |
96 | 101 | with: |
97 | | - path: upload |
| 102 | + aws-region: "us-east-1" |
| 103 | + role-to-assume: ${{ secrets.AWS_IAM_ROLE }} |
| 104 | + role-session-name: GHA_DebianImages_via_FederatedOIDC |
| 105 | + mask-aws-account-id: true |
98 | 106 |
|
| 107 | + - name: upload to S3 |
| 108 | + run: | |
| 109 | + for file in upload/*.deb; do |
| 110 | + aws s3 cp "$file" "s3://${{ secrets.AWS_BUKET }}/build-deb/" |
| 111 | + done |
0 commit comments