From ab3d9bc120ebb06078b139cb337a87f4d08159e3 Mon Sep 17 00:00:00 2001 From: Julien Neuhart Date: Thu, 7 Jan 2021 16:18:48 +0100 Subject: [PATCH] Remove TravisCI, add GitHub Actions --- .github/workflows/publish.yml | 14 ------------ .github/workflows/push.yml | 12 ----------- .github/workflows/tests_maybe_release.yml | 26 +++++++++++++++++++++++ .travis.yml | 26 ----------------------- README.md | 2 +- 5 files changed, 27 insertions(+), 53 deletions(-) delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/push.yml create mode 100644 .github/workflows/tests_maybe_release.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 6420779c..00000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Publish -on: - push: - branches: - - releases/* - -jobs: - publish: - name: Publish to Docker Hub - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v1 - - run: echo $GITHUB_REF - #- run: make publish VERSION=$GITHUB_REF DOCKER_USER=${{ secrets.DOCKER_USER }} DOCKER_PASSWORD=${{ secrets.DOCKER_PASSWORD }} \ No newline at end of file diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml deleted file mode 100644 index 2060325a..00000000 --- a/.github/workflows/push.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Push -on: push - -jobs: - tests: - name: Lint, tests and code coverage - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v1 - #- run: make lint - #- run: make tests CODE_COVERAGE=1 - #- run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/tests_maybe_release.yml b/.github/workflows/tests_maybe_release.yml new file mode 100644 index 00000000..b562239a --- /dev/null +++ b/.github/workflows/tests_maybe_release.yml @@ -0,0 +1,26 @@ +name: tests_maybe_release + +on: + push: + pull_request: + release: + types: [published] + +jobs: + tests_maybe_release: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - uses: actions/checkout@v1 + - name: Lint code + run: make lint + - name: Run tests + run: | + make tests CODE_COVERAGE=1 + bash <(curl -s https://codecov.io/bash) + - name: Release + if: ${{ github.event_name == 'release' }} + run: make publish VERSION=${{ github.event.release.tag_name }} DOCKER_USER=${{ secrets.DOCKER_USER }} DOCKER_PASSWORD=${{ secrets.DOCKER_PASSWORD }} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2c3a2d57..00000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -sudo: required - -language: generic - -services: - - docker - -env: - global: - - secure: d6pliM7iR7KJ3TQkr1C0tHi0HgU6Vdmc/ycw11XrXs794/dgj6g9UDrhgcvT2mTzOVIUNouHx7gyEWAlwJv7p8PPyguHJfIsyqMWfaXNPoytTx1ETUiygl1G/UsvXVdry6I5tZF/U+/PJ3hBXoAvo8EOFe0/MxxvP3ghCeeCpeEwEdoYP2jbADGffywVUNI7OEdmS29A28GusXXp2cWCIZYSq5Gn5iu1ZMPaJA6SkRTXpS+iVVLUvlbz5HW09ETFfurTvsdz5Ze4JICiuQt///CR1uwdxD8K7Ils/mkenaMtja9NHA9RdQBa51Azn8iCLsObCTYc52Zb6atbCi/X4ae9M8GA8qaaLigNz5G4v1BHneJylYfWKj5GwqUA3VmRu1mlEw7d2sN2uFRmgIl5kgsYYyOVOLBOKaJWhyBhNnR4U8KeqwUkOnlSdmNZnjfexXXBEcKHen1SozpXwMnzZh8LZuN6BNYd6TVpKmjulGI3vqNMM0c4JJZ9pSm4q5FjbNGQArwCsujDDwY4bCGZSJJTPMXjYOrx4yJ1RY+0TpyV9oDU3ogEqaWnhrkgrphfiYBlDY2bEvrxMTMukLCxJb0Nru6LGCpg4X1P9hu9r0gceqUSnBgdJI4rYTNddenxlEd4j/Thqv835stJWz6YoV+rfvERuSUpntl8xvrk3U8= - - secure: CmLh169xwt3OC7l19lDUwdZYfw+l/+XXKjTGxnuJiXHa9hAH+nc4mEUSmqHMHwjquyYE6LnSVGZ94LH8sCaGed/TMm0Lj3DZtZ0VsjYu3sKsNrVJn5WdYEah+GvNJ8i8uzvHnGk1L2fAagLpXFUB2K9UraA1CFiHs1fF5Fua7Ra0mE7lMz0MFvyvzcmc9u8nMz71K2YVsXqn+I/rv8onJCTtc/Ds0hVrBXwG5Fh0T3xHqjOhME9ZI2hRHnnQVdBojSY3USifQ//qAKowfBVc0pebEtgFpyXx/I17A6xCm0KVtnA2tNqu1+XFkjWaBzryaLE9ujhJcTRC/YK0JUZ+QxfYbD5C7jVy9Jlx1lOEjJ42B/ImNxPP+9p3wi2MWNbcbZJPxIe635fnT17lI7CLK2Qg1xjfTQ4WTEKW5IhnYMiyfRKiripFh4PCkDm8cJlTbpntsX1n0uheydbsgf/11vS7o1WGhVQ8+Jelc4DvIbBHCqienQEOLJDBwm7FiK5JbwZJ6ZAGeDM/IhGU1h9PNjVbHUyJhUxYoPYUE9QsZFT7ENCrRQpq49KOzXBRfffyJNJRh+Ep9X5YoW0dUp0MNu5B7z2+6w9X9n/C+loa11xF42bFzniCvvbSOQ37J+EngDinVxJkNPeyivR4fye2ENhIAjAEjouTJLOSXL9nAOU= - -stages: - - tests - - publish - -jobs: - include: - - stage: tests - script: - - make lint - - make tests CODE_COVERAGE=1 - - bash <(curl -s https://codecov.io/bash) - - stage: publish - if: tag IS present - script: make publish VERSION=$TRAVIS_TAG DOCKER_USER=$DOCKER_USER DOCKER_PASSWORD=$DOCKER_PASS \ No newline at end of file diff --git a/README.md b/README.md index 173a3868..8d2d044e 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ to learn how to interact with it! [![Docker pulls](https://img.shields.io/docker/pulls/thecodingmachine/gotenberg)](https://hub.docker.com/r/thecodingmachine/gotenberg) [![Docker image layers](https://images.microbadger.com/badges/image/thecodingmachine/gotenberg:6.svg)](https://microbadger.com/images/thecodingmachine/gotenberg:6) -[![Travis CI](https://travis-ci.org/thecodingmachine/gotenberg.svg?branch=master)](https://travis-ci.org/thecodingmachine/gotenberg) +[![GitHub Actions](https://github.com/thecodingmachine/gotenberg/workflows/tests_maybe_release/badge.svg)](https://github.com/thecodingmachine/gotenberg/workflows/tests_maybe_release) [![GoDoc](https://godoc.org/github.com/thecodingmachine/gotenberg?status.svg)](https://godoc.org/github.com/thecodingmachine/gotenberg) [![Codecov](https://codecov.io/gh/thecodingmachine/gotenberg/branch/master/graph/badge.svg)](https://codecov.io/gh/thecodingmachine/gotenberg) [![Go Report Card](https://goreportcard.com/badge/github.com/thecodingmachine/gotenberg)](https://goreportcard.com/report/thecodingmachine/gotenberg)