feat: update curl-apt-get feature to use the extra repository #76
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Build dev container" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| list-dir: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| dir: ${{ steps.list-dir.outputs.dir }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: List Dir | |
| id: list-dir | |
| uses: pnstack/actions/list-dir@main | |
| with: | |
| dir: templates | |
| - name: log | |
| run: echo ${{ steps.list-dir.outputs.dir }} | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: [list-dir] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| dir: ${{fromJson(needs.list-dir.outputs.dir)}} | |
| platform: ["linux/amd64"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| use: true | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@v3.0.0 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| - name: Build and run Dev Container task | |
| uses: devcontainers/ci@v0.3 | |
| with: | |
| subFolder: ./templates${{ matrix.platform == 'linux/arm64' && '-arm' || '' }}/${{ matrix.dir }} | |
| imageName: ghcr.io/pnstack/codespace/${{ matrix.dir }}${{ matrix.platform == 'linux/arm64' && '-arm' || '' }} | |
| cacheFrom: ghcr.io/pnstack/codespace/${{ matrix.dir }}:latest | |
| imageTag: ${{ github.ref == 'refs/heads/main' && 'latest' || steps.meta.outputs.tags }} | |
| platform: ${{ matrix.platform }} | |
| push: always | |
| list-dir-arm: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| dir: ${{ steps.list-dir.outputs.dir }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: List Dir | |
| id: list-dir | |
| uses: pnstack/actions/list-dir@main | |
| with: | |
| dir: templates-arm | |
| - name: log | |
| run: echo ${{ steps.list-dir.outputs.dir }} | |
| build-arm: | |
| runs-on: ubuntu-latest | |
| needs: [list-dir-arm] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| dir: ${{fromJson(needs.list-dir-arm.outputs.dir)}} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| use: true | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@v3.0.0 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| - name: Build and run Dev Container task | |
| uses: devcontainers/ci@v0.3 | |
| with: | |
| subFolder: ./templates-arm/${{ matrix.dir }} | |
| imageName: ghcr.io/pnstack/codespace/${{ matrix.dir }}-arm | |
| cacheFrom: ghcr.io/pnstack/codespace/${{ matrix.dir }}:latest | |
| imageTag: ${{ github.ref == 'refs/heads/main' && 'latest' || steps.meta.outputs.tags }} | |
| platform: linux/arm64 | |
| push: always |