From 15d936577d796226d5163af36d92160e693cbcdb Mon Sep 17 00:00:00 2001 From: kv Date: Mon, 22 Jun 2020 14:06:19 +0800 Subject: [PATCH] add cd action (#275) --- .github/workflows/api_cd.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/api_cd.yml diff --git a/.github/workflows/api_cd.yml b/.github/workflows/api_cd.yml new file mode 100644 index 00000000000000..528d8aded03bdf --- /dev/null +++ b/.github/workflows/api_cd.yml @@ -0,0 +1,27 @@ +name: API CD + +on: + push: + branches: + - master + - cd + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: Azure/docker-login@v1 + with: + login-server: apisixacr.azurecr.cn + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - run: | + cd ./api + docker build . -t apisixacr.azurecr.cn/manager-api:${{ github.sha }} + docker push apisixacr.azurecr.cn/manager-api:${{ github.sha }} \ No newline at end of file