From 4a87ee94b527c6e55c53de9ec0ac20fe88ddc3d8 Mon Sep 17 00:00:00 2001 From: Silvio Fricke Date: Wed, 19 May 2021 13:58:31 +0200 Subject: github: add actionfile for tests Closes #19 Signed-off-by: Silvio Fricke --- .github/workflows/main.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ Makefile.version | 3 +++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..3d54321 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,45 @@ + +name: Create and Test Dockerimage for silvio/docker-languagetool + +on: + push: + branches: [ master ] + + workflow_dispatch: + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set environment variables + run: | + make envout >> ${GITHUB_ENV} + + - name: show env debug + run: | + echo $VERSION + + - name: Prepare system + run: | + make prepare + + - name: Build Docker image + run: | + make build + + - name: Run tests + run: | + make test + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + - name: Make tag + run: | + make tag diff --git a/Makefile.version b/Makefile.version index 3696544..915cb39 100644 --- a/Makefile.version +++ b/Makefile.version @@ -1,2 +1,5 @@ VERSION := 5.3 BUILDARG_VERSION := --build-arg VERSION=$(VERSION) + +envout: + @echo "VERSION=$(VERSION)" -- cgit v1.2.3