调试docker #3
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: OpenHarmony Build | |
| on: | |
| push: | |
| branches: | |
| - 'oh_**' | |
| pull_request: | |
| branches: | |
| - 'oh_**' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Ensure Docker is running | |
| run: | | |
| sudo systemctl start docker | |
| sudo systemctl enable docker | |
| docker --version | |
| - name: Set up Docker | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Build using Docker | |
| run: | | |
| docker run --rm \ | |
| -v ${{ github.workspace }}:/workspace \ | |
| -w /workspace \ | |
| ubuntu:20.04 \ | |
| bash -c "apt-get update && apt-get install -y bash && ./build-openharmony-x64.sh" |