This is an automated email from the ASF dual-hosted git repository. juzhiyuan pushed a commit to branch feat-deploy-with-docker in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git
commit 5e092c6aae548c138d43492a6c192078b163cdb7 Author: juzhiyuan <[email protected]> AuthorDate: Thu Nov 5 18:27:44 2020 +0800 feat: added deploy with docker CD --- .github/workflows/deploy-with-docker.yml | 40 ++++++++++++++++++++++++++++++++ .github/workflows/test-docker.yml | 21 ----------------- 2 files changed, 40 insertions(+), 21 deletions(-) diff --git a/.github/workflows/deploy-with-docker.yml b/.github/workflows/deploy-with-docker.yml new file mode 100644 index 0000000..8b8ffdd --- /dev/null +++ b/.github/workflows/deploy-with-docker.yml @@ -0,0 +1,40 @@ +name: Deploy with Docker + +on: + push: + branches: + - master + - v2.0 + pull_request: + branches: + - master + # NOTE: Just to trigger CD in this PR, will be removed before being merged + - v2.0 + +jobs: + build: + runs-on: ubuntu-latest + + services: + etcd: + image: bitnami/etcd:3.3.13-r80 + ports: + - 2379:2379 + - 2380:2380 + env: + ALLOW_NONE_AUTHENTICATION: yes + + steps: + - uses: actions/checkout@v2 + + - uses: Azure/docker-login@v1 + with: + login-server: apisixacr.azurecr.cn + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Build then Deploy + run: | + docker build -t apisixacr.azurecr.cn/dashboard:${{ github.sha }} . + docker push apisixacr.azurecr.cn/dashboard:${{ github.sha }} + docker run -d -p 80:8080 -v ${pwd}/docs/examples/docker-conf-example.json:/usr/local/apisix-dashboard/conf/conf.json apisixacr.azurecr.cn/dashboard:${{ github.sha }} diff --git a/.github/workflows/test-docker.yml b/.github/workflows/test-docker.yml deleted file mode 100644 index 49bfcd2..0000000 --- a/.github/workflows/test-docker.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Deploy with Docker - -on: - push: - branches: - - master - - v2.0 - pull_request: - branches: - - master - - v2.0 - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Run with Docker - run: | - docker build -t apisix-dashboard:dev . - docker run -d -p 8081:8080 apisix-dashboard:dev
