From 0fc3ef9e9bdaa3480eef802dd7a26badee3ca88f Mon Sep 17 00:00:00 2001 From: Kanishkar J Date: Mon, 15 Jun 2020 21:00:01 +0530 Subject: [PATCH] Create ci.yml Signed-off-by: kanishkarj --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b79a4a4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: Learn Layer5 + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + docker: + name: Docker build and push + runs-on: ubuntu-latest + steps: + - name: Check out code + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success() + uses: actions/checkout@master + with: + fetch-depth: 1 + - name: Docker login + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success() + uses: azure/docker-login@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Docker build & push + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success() + run: | + make build-img-service + make image-push