|
| 1 | +name: Debusine Container Build And Upload |
| 2 | +description: | |
| 3 | + Builds and uploads to GHCR the Debian builder images used by the Debusine-based |
| 4 | + reusable workflows. Images are built natively on an arm64 runner and published |
| 5 | + on push, scheduled runs, and manual dispatches. |
| 6 | +
|
| 7 | +on: |
| 8 | + schedule: |
| 9 | + - cron: '0 0 * * 1' |
| 10 | + |
| 11 | + pull_request: |
| 12 | + branches: |
| 13 | + - main |
| 14 | + - development |
| 15 | + paths: |
| 16 | + - '.github/workflows/qcom-debusine-container-build-and-upload.yml' |
| 17 | + - 'Dockerfiles/debusine-builder/**' |
| 18 | + |
| 19 | + push: |
| 20 | + branches: |
| 21 | + - main |
| 22 | + - development |
| 23 | + paths: |
| 24 | + - '.github/workflows/qcom-debusine-container-build-and-upload.yml' |
| 25 | + - 'Dockerfiles/debusine-builder/**' |
| 26 | + |
| 27 | + workflow_dispatch: |
| 28 | + |
| 29 | +permissions: |
| 30 | + contents: read |
| 31 | + packages: write |
| 32 | + |
| 33 | +env: |
| 34 | + QCOM_ORG_NAME: qualcomm-linux |
| 35 | + IMAGE_NAME: debusine-pkg-builder |
| 36 | + |
| 37 | +jobs: |
| 38 | + build-debian-arm64: |
| 39 | + name: Build ${{ matrix.suite }} image |
| 40 | + runs-on: ubuntu-24.04-arm |
| 41 | + strategy: |
| 42 | + fail-fast: false |
| 43 | + matrix: |
| 44 | + suite: |
| 45 | + - trixie |
| 46 | + - sid |
| 47 | + |
| 48 | + steps: |
| 49 | + - name: Checkout repository |
| 50 | + uses: actions/checkout@v5 |
| 51 | + |
| 52 | + - name: Build Debian image |
| 53 | + run: | |
| 54 | + docker build \ |
| 55 | + -t ghcr.io/${{ env.QCOM_ORG_NAME }}/${{ env.IMAGE_NAME }}:${{ matrix.suite }} \ |
| 56 | + -f Dockerfiles/debusine-builder/Dockerfile.${{ matrix.suite }} \ |
| 57 | + Dockerfiles/debusine-builder |
| 58 | +
|
| 59 | + - name: Log in to GHCR |
| 60 | + if: ${{ github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} |
| 61 | + uses: docker/login-action@v3 |
| 62 | + with: |
| 63 | + registry: ghcr.io |
| 64 | + username: ${{ github.actor }} |
| 65 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 66 | + |
| 67 | + - name: Upload Debian image |
| 68 | + if: ${{ github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} |
| 69 | + run: docker push ghcr.io/${{ env.QCOM_ORG_NAME }}/${{ env.IMAGE_NAME }}:${{ matrix.suite }} |
0 commit comments