diff --git a/.devcontainer.json b/.devcontainer.json new file mode 100644 index 0000000..a428679 --- /dev/null +++ b/.devcontainer.json @@ -0,0 +1,5 @@ +{ + "build": { + "dockerfile": "Dockerfile" + } +} diff --git a/.github/workflows/build-devcontainer.yml b/.github/workflows/build-devcontainer.yml new file mode 100644 index 0000000..4756371 --- /dev/null +++ b/.github/workflows/build-devcontainer.yml @@ -0,0 +1,36 @@ +on: + push: + branches: [ master ] + +concurrency: + group: build-devcontainer + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + registry: + - registry.cn-hangzhou.aliyuncs.com + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + registry: ${{ matrix.registry }} + username: ${{ secrets.ACR_USERNAME }} + password: ${{ secrets.ACR_PASSWORD }} + + - name: Build dev container image + uses: devcontainers/ci@v0.3 + with: + imageTag: latest,2021.7 + imageName: ${{ matrix.registry }}/xingrz/devcontainer-hifi4 + cacheFrom: ${{ matrix.registry }}/xingrz/devcontainer-hifi4 + platform: linux/amd64 + push: always