diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 309e9af..566d5e5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,11 +1,34 @@ -name: Docker Image CI on: push +name: Build and Publish jobs: - build: + test: + name: Test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag base - - name: Print environment variables - run: printenv + - uses: actions/checkout@v1 + - name: Test + uses: actions/action-builder/shell@master + with: + entrypoint: make + args: test + - name: Lint + uses: actions/action-builder/shell@master + with: + entrypoint: make + args: lint + - name: Build + uses: actions/action-builder/docker@master + with: + entrypoint: make + args: build + - name: Docker Login + uses: actions/docker/login@master + env: + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_REGISTRY_URL: "docker.pkg.github.com" + - name: Publish + uses: actions/action-builder/docker@master + with: + entrypoint: make + args: publish