diff options
Diffstat (limited to '.github/workflows/main.yml')
-rw-r--r-- | .github/workflows/main.yml | 69 |
1 files changed, 29 insertions, 40 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3fddc7e..a8a47ef 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,51 +1,40 @@ -name: Release for silvio/docker-languagetool - +name: Build on: push: - tags: - - '[0-9]+.[0-9]+' - - '[0-9]+.[0-9]+.[0-9]+' - - '[0-9]+.[0-9]+-update[0-9]+' - - '[0-9]+.[0-9]+.[0-9]+-update[0-9]+' + branches: [ master ] + schedule: + - cron: '5 4 * * *' + workflow_dispatch: jobs: - docker: + build: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - - name: Set environment variables - run: | - make envout >> ${GITHUB_ENV} - - - name: Prepare system - run: | - make prepare - - - name: Build Docker image - run: | - make build + - uses: actions/checkout@v2 + - run: | + make docker-test - - name: Run tests - run: | - make test - - - name: Login Docker - uses: docker/login-action@v1 + push: + runs-on: ubuntu-latest + needs: [ build ] + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v2 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} + fetch-depth: 0 - - name: Push tag - run: | - make tag + - uses: docker/login-action@v1 + env: + GITHUB_USER: ${{ github.actor }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + registry: ghcr.io + username: $GITHUB_USER + password: ${{ secrets.GITHUB_TOKEN }} + - run: | + make docker-push \ + DOCKER_EXTRA_ARGS="-v ${HOME}/.docker:/root/.docker" |