From 1cd93aa27ad123593b5be82ab2024406010a7f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agn=C4=97?= Date: Tue, 13 Sep 2022 12:17:34 -0700 Subject: [PATCH 01/10] add initial gha workflow --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 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..70c95ce --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: actions/ci + +on: [push] + +env: + DOCKER_EMAIL: "" + DOCKER_PASSWORD: "" + DOCKER_USERNAME: "" + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Setup Go + uses: actions/setup-go@v3 + env: + ImageOS: ubuntu20 + with: + go-verion: 1.18 + check-latests: true + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Run Test + run: make test From 9cd095719f485ce437c84514a063c8e4298378cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agn=C4=97?= Date: Tue, 13 Sep 2022 12:44:33 -0700 Subject: [PATCH 02/10] add make debs --- .github/workflows/ci.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70c95ce..0486473 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,11 +2,6 @@ name: actions/ci on: [push] -env: - DOCKER_EMAIL: "" - DOCKER_PASSWORD: "" - DOCKER_USERNAME: "" - jobs: test: runs-on: ubuntu-latest @@ -22,3 +17,16 @@ jobs: uses: actions/checkout@v3 - name: Run Test run: make test + + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Make Debs + run: | + make debs + export DEB_VERSION=$(git describe --tags --always | sed s.^v//) + docker login -u=${{ secrets.DOCKER_USERNAME }} -p=${{ secrets.DOCKER_PASSWORD }} + make docker-push + echo $DEB_VERSION From c51903db178d738758604234ec3b9edcd0d6fa8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agn=C4=97?= Date: Tue, 13 Sep 2022 16:40:46 -0700 Subject: [PATCH 03/10] update dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 48644e2..663aaa1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -FROM gliderlabs/alpine:3.3 +FROM alpine:latest -RUN apk-install ca-certificates +RUN apk add --no-cache ca-certificates && update-ca-certificates # assumes log-shuttle has already been built into .docker_build/log-shuttle, # which the Makefile does. From e24b408781857f108a3874092256efe147d175a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agn=C4=97?= Date: Wed, 14 Sep 2022 10:21:06 -0700 Subject: [PATCH 04/10] add GHA docker hub login action --- .github/workflows/ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0486473..f3c1132 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,12 +21,16 @@ jobs: deploy: runs-on: ubuntu-latest steps: + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Checkout Repo uses: actions/checkout@v3 - name: Make Debs run: | make debs - export DEB_VERSION=$(git describe --tags --always | sed s.^v//) - docker login -u=${{ secrets.DOCKER_USERNAME }} -p=${{ secrets.DOCKER_PASSWORD }} + export DEB_VERSION=$(git describe --tags --always | sed s/^v//) + echo "DEB VERSION: " $DEB_VERSION make docker-push - echo $DEB_VERSION From 76c2c0426362132670e1d4fa15679215a4d96c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agn=C4=97?= Date: Wed, 14 Sep 2022 15:30:21 -0700 Subject: [PATCH 05/10] add release job --- .github/workflows/ci.yml | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3c1132..88493a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - name: Run Test run: make test - deploy: + docker: runs-on: ubuntu-latest steps: - name: Login to Docker Hub @@ -28,9 +28,27 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Checkout Repo uses: actions/checkout@v3 - - name: Make Debs - run: | - make debs - export DEB_VERSION=$(git describe --tags --always | sed s/^v//) - echo "DEB VERSION: " $DEB_VERSION - make docker-push + - name: Push to Docker Hub + run: make docker-push + +name: actions/release + +on: + push: + tags: + - '*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Make Debs + uses: actions/checkout@v3 + run: | + make debs + export DEB_VERSION=$(git describe --tags --always | sed s/^v//) + - name: Make Release + uses: actions/checkout@v3 + uses: ncipollo/release-action@v1 + with: + artifacts: "log-shuttle_${DEB_VERSION}_amd64.deb" From 13e3e4bcfe7e3290fde0974acb18d3a121cb12f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agn=C4=97?= Date: Wed, 14 Sep 2022 15:43:15 -0700 Subject: [PATCH 06/10] split actions --- .github/workflows/ci.yml | 22 ---------------------- .github/workflows/release.yml | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88493a2..d96b02f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,25 +30,3 @@ jobs: uses: actions/checkout@v3 - name: Push to Docker Hub run: make docker-push - -name: actions/release - -on: - push: - tags: - - '*' - -jobs: - release: - runs-on: ubuntu-latest - steps: - - name: Make Debs - uses: actions/checkout@v3 - run: | - make debs - export DEB_VERSION=$(git describe --tags --always | sed s/^v//) - - name: Make Release - uses: actions/checkout@v3 - uses: ncipollo/release-action@v1 - with: - artifacts: "log-shuttle_${DEB_VERSION}_amd64.deb" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..09e36ff --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: actions/release + +on: + push: + tags: + - '*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Make Debs + run: | + make debs + echo DEB_VERSION=$(git describe --tags --always | sed s/^v//) >> $GITHUB_ENV + - name: Make Release + uses: ncipollo/release-action@v1 + env: + ARTIFACT: log-shuttle_${{ env.DEB_VERSION }}_amd64.deb + with: + artifacts: ${{ env.ARTIFACT }} From 3e901298271b1c46c5600afab9a053f535fd1677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agn=C4=97?= Date: Thu, 15 Sep 2022 11:19:11 -0700 Subject: [PATCH 07/10] add packagecloud action --- .github/workflows/ci.yml | 13 --------- .github/workflows/release.yml | 52 +++++++++++++++++++++++++---------- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d96b02f..b3e35d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,16 +17,3 @@ jobs: uses: actions/checkout@v3 - name: Run Test run: make test - - docker: - runs-on: ubuntu-latest - steps: - - name: Login to Docker Hub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Checkout Repo - uses: actions/checkout@v3 - - name: Push to Docker Hub - run: make docker-push diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 09e36ff..fcf0b13 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,17 +6,41 @@ on: - '*' jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Make Debs - run: | - make debs - echo DEB_VERSION=$(git describe --tags --always | sed s/^v//) >> $GITHUB_ENV - - name: Make Release - uses: ncipollo/release-action@v1 - env: - ARTIFACT: log-shuttle_${{ env.DEB_VERSION }}_amd64.deb - with: - artifacts: ${{ env.ARTIFACT }} + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Make Debs + run: | + make debs + echo DEB_VERSION=$(git describe --tags --always | sed s/^v//) >> $GITHUB_ENV + - name: Make Release + uses: ncipollo/release-action@v1 + env: + ARTIFACT: log-shuttle_${{ env.DEB_VERSION }}_amd64.deb + with: + artifacts: ${{ env.ARTIFACT }} + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.7.2 + - name: Push to packagecloud.io + env: + PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} + ARTIFACT: log-shuttle_${{ env.DEB_VERSION }}_amd64.deb + run: | + gem install package_cloud + package_cloud push heroku/open/ubuntu/trusty ./${{ env.ARTIFACT }} + + docker: + runs-on: ubuntu-latest + steps: + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Push to Docker Hub + run: make docker-push From 213448f248b7277338ec27e92befd8384a232f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agn=C4=97?= Date: Thu, 15 Sep 2022 11:38:19 -0700 Subject: [PATCH 08/10] rm travis --- .travis.yml | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0a4b798..0000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -language: go -services: -- docker -go: -- go1.13.x -script: -- make test -before_deploy: -- make debs -- export DEB_VERSION=$(git describe --tags --always | sed s/^v//) -- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" -- make docker-push -deploy: -- provider: releases - skip_cleanup: true - api_key: - secure: "oRgJdZouAhHxSfwNSuI5fy6pCsvsCuPfvqzt6i11js77CFvtyLu3XlG8kWVKNeJGxPU+Lnu5Hn6xhSYD8zx+UqchgnPlxuzouzhefIyD9WIbsyQw3jSlZukqXPijjcDd3x3QbiBESyyG4TDK2N9YDAG00XJVt2A8p0dZ01cuDww=" - file: log-shuttle_${DEB_VERSION}_amd64.deb - on: - tags: true - repo: heroku/log-shuttle -- provider: packagecloud - skip_cleanup: true - repository: open - username: heroku - token: - secure: GcoejgkhMk8JC9KJQwKho0XDST2adk/7HzEM1+5CiftXgc+Y17+GLIBm4uKaVIqugkMPU5av3IbAMJkcyoSN9rpiPoYBbc/cCxoR8OCMYWASuD25+U75ptMTV692jLYr2VKa4wJ+vg1IIwsNJ5ypGuxLFpc7SOd4LylaBQ3S0go= - dist: ubuntu/trusty - package_glob: "*.deb" - on: - tags: true - repo: heroku/log-shuttle -env: - global: #DOCKER_EMAIL, DOCKER_PASSWORD, DOCKER_USERNAME - - secure: pNIDqDmqOWV3afbSY11QaIAdnsZyQ+/OA+gMLpeA44EPkj4yoTbDVBv8Y5sHlpPkP1fmPsfZKPNTbVXUnGPkJ4Y2dFVt8n5sJYtlV+pHzPf50JUmGNzxuxb9bWxKP5XM/ka3wujAibZMQdJDeMhP9Q0CSi8x5L/wQN+8hB56DhY= - - secure: Ps5ZA+Tg6k3dwkGcabl+4ci47ARwzzQDKka/3TgnSBroHqvuF6yx0/XnDv3GNe9kUE402apAO4Kt1aEBSQ8DExwCdyCv8f8RzsiygjrkYEPiDbVPgIvmru6xMWAr/MPWv3xWQF1Yf1AzOtDvXOgRiFgGIBLMYVAPYMCgS8AuPFU= - - secure: jOlEUnly5Kvats37qv9/p0YtqToYgehV4SI9qQ6YW+Zzzmz3rwkH/ht/pcDnTcUMYb67HXtmutOTs/NG0F23S6RwCgioc7GEaUW21OXUNkKorSmizPzDv36NH0nzJVrG2WRTzoKErsBoVieT2MxOtQrASEwMSHtJdfOD5NCIijo= From bb22b8906fffcb50231448b4df94a578f18166ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agn=C4=97?= Date: Mon, 19 Sep 2022 11:58:29 -0700 Subject: [PATCH 09/10] test token --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fcf0b13..217abe9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: ruby-version: 2.7.2 - name: Push to packagecloud.io env: - PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} + PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN_TEST }} ARTIFACT: log-shuttle_${{ env.DEB_VERSION }}_amd64.deb run: | gem install package_cloud From c2dc7943da7595ca268e06f22c2e09afae339a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agn=C4=97?= Date: Mon, 19 Sep 2022 12:03:58 -0700 Subject: [PATCH 10/10] revert --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 217abe9..47967bf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: ruby-version: 2.7.2 - name: Push to packagecloud.io env: - PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN_TEST }} + PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} ARTIFACT: log-shuttle_${{ env.DEB_VERSION }}_amd64.deb run: | gem install package_cloud