From a9bd237c1469b963f51f94c53520f49527c2b3ab Mon Sep 17 00:00:00 2001 From: xychen Date: Tue, 23 Jan 2024 15:09:03 +0800 Subject: [PATCH] Build devcontainer --- .devcontainer.json | 5 ++++ .github/workflows/build-devcontainer.yml | 35 ++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .devcontainer.json create mode 100644 .github/workflows/build-devcontainer.yml 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..f747286 --- /dev/null +++ b/.github/workflows/build-devcontainer.yml @@ -0,0 +1,35 @@ +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: + imageName: ${{ matrix.registry }}/xingrz/devcontainer-hifi4 + cacheFrom: ${{ matrix.registry }}/xingrz/devcontainer-hifi4 + imageTag: latest,2021.7 + push: true