From 92599c2fd7846ba58b7b46dcff3cd27eb970f608 Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Mon, 16 Sep 2019 10:44:20 +0300 Subject: [PATCH 01/13] Add blank.yml --- .github/workflows/blank.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/blank.yml diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml new file mode 100644 index 0000000000..8b18469189 --- /dev/null +++ b/.github/workflows/blank.yml @@ -0,0 +1,18 @@ +name: CI + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Docker version + run: docker version + - name: Build image + run: | + docker build + --build-arg COVERALLS_TOKEN=$COVERALLS_TOKEN + . + env: + COVERALLS_TOKEN: ${{secrets.COVERALLS_TOKEN}} \ No newline at end of file From 899745f46eb74ae921f2b86dc1d28ecb8e0f7424 Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Mon, 16 Sep 2019 10:49:59 +0300 Subject: [PATCH 02/13] Fix ci --- .github/workflows/blank.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 8b18469189..0fd4057c87 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -11,8 +11,8 @@ jobs: run: docker version - name: Build image run: | - docker build - --build-arg COVERALLS_TOKEN=$COVERALLS_TOKEN + docker build \ + --build-arg COVERALLS_TOKEN=$COVERALLS_TOKEN \ . env: COVERALLS_TOKEN: ${{secrets.COVERALLS_TOKEN}} \ No newline at end of file From 8f65a22882657ae0ed5f89754e60551684ba255a Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Mon, 16 Sep 2019 11:01:02 +0300 Subject: [PATCH 03/13] Update blank.yml --- .github/workflows/blank.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 0fd4057c87..aa13453ff3 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -9,9 +9,12 @@ jobs: - uses: actions/checkout@v1 - name: Docker version run: docker version + - name: show env + run: env - name: Build image run: | docker build \ + --build-arg CI=$CI \ --build-arg COVERALLS_TOKEN=$COVERALLS_TOKEN \ . env: From f9c25466e119b1dea714b8ae1713db03bc148fb0 Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Fri, 20 Sep 2019 09:15:02 +0300 Subject: [PATCH 04/13] Update blank.yml --- .github/workflows/blank.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index aa13453ff3..da17aa14a9 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -10,7 +10,7 @@ jobs: - name: Docker version run: docker version - name: show env - run: env + run: echo $GITHUB_BASE_REF - name: Build image run: | docker build \ From 0ee233671f4a9c50a922df5b767501a9b55147e8 Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Fri, 20 Sep 2019 09:44:45 +0300 Subject: [PATCH 05/13] Add debug --- .github/workflows/blank.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index da17aa14a9..642aa4f540 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -9,8 +9,12 @@ jobs: - uses: actions/checkout@v1 - name: Docker version run: docker version - - name: show env - run: echo $GITHUB_BASE_REF + - name: Debug + run: | + [[ "$TRACE" ]] && env + cat "${GITHUB_EVENT_PATH}" + env: + DEBUG: ${{secrets.DEBUG}} - name: Build image run: | docker build \ From d5b581ba67ad214acc07f89854f97e420cfdfd86 Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Fri, 20 Sep 2019 09:50:15 +0300 Subject: [PATCH 06/13] Show environments variables --- .github/workflows/blank.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 642aa4f540..37c2c92f2f 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -11,7 +11,7 @@ jobs: run: docker version - name: Debug run: | - [[ "$TRACE" ]] && env + [[ "$DEBUG" ]] && env cat "${GITHUB_EVENT_PATH}" env: DEBUG: ${{secrets.DEBUG}} From cc5c679eb91b3788ea6a4841ce49bd508ae42eff Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Fri, 20 Sep 2019 10:33:04 +0300 Subject: [PATCH 07/13] Add test env for travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 9cb6efc16d..6a5bdf2bd3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ install: - docker --version - docker-compose --version + - env script: - docker build From 57611cdbb30a7326e70892f2366c1eb033099e00 Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Fri, 20 Sep 2019 10:51:12 +0300 Subject: [PATCH 08/13] Update blank.yml --- .github/workflows/blank.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 37c2c92f2f..d556d19d0b 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -19,7 +19,7 @@ jobs: run: | docker build \ --build-arg CI=$CI \ - --build-arg COVERALLS_TOKEN=$COVERALLS_TOKEN \ + --build-arg COVERALLS_TOKEN=$COVERALLS_TOKEN . env: COVERALLS_TOKEN: ${{secrets.COVERALLS_TOKEN}} \ No newline at end of file From 58e8612f3073a2d6f14f2a841b560062b5e4e73c Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Fri, 20 Sep 2019 10:59:11 +0300 Subject: [PATCH 09/13] Update formatting --- .github/workflows/blank.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index d556d19d0b..37c2c92f2f 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -19,7 +19,7 @@ jobs: run: | docker build \ --build-arg CI=$CI \ - --build-arg COVERALLS_TOKEN=$COVERALLS_TOKEN + --build-arg COVERALLS_TOKEN=$COVERALLS_TOKEN \ . env: COVERALLS_TOKEN: ${{secrets.COVERALLS_TOKEN}} \ No newline at end of file From 5a552ef58e398991e98f87aabc5de5947a76c700 Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Fri, 20 Sep 2019 11:27:08 +0300 Subject: [PATCH 10/13] Add env variable GIT_BRANCH --- .github/workflows/blank.yml | 7 +++++-- .travis.yml | 1 - Dockerfile | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 37c2c92f2f..8456443d5b 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -9,16 +9,19 @@ jobs: - uses: actions/checkout@v1 - name: Docker version run: docker version - - name: Debug + - name: Debug if needed run: | [[ "$DEBUG" ]] && env - cat "${GITHUB_EVENT_PATH}" env: DEBUG: ${{secrets.DEBUG}} - name: Build image run: | + export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}" + echo $GIT_BRANCH + docker build \ --build-arg CI=$CI \ + --build-arg GIT_BRANCH=$GIT_BRANCH \ --build-arg COVERALLS_TOKEN=$COVERALLS_TOKEN \ . env: diff --git a/.travis.yml b/.travis.yml index 6a5bdf2bd3..9cb6efc16d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ install: - docker --version - docker-compose --version - - env script: - docker build diff --git a/Dockerfile b/Dockerfile index ae20f37d2f..b4cc19b54a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ FROM umputun/baseimage:buildgo-latest as build-backend ARG COVERALLS_TOKEN ARG CI +ARG GIT_BRANCH ARG TRAVIS ARG TRAVIS_BRANCH ARG TRAVIS_COMMIT From 6a2d0b2317b7fd577461d0dc5a5373e3d1369b6e Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Fri, 20 Sep 2019 11:37:44 +0300 Subject: [PATCH 11/13] Change setting CI --- .github/workflows/blank.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 8456443d5b..7041b1d5a4 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -1,4 +1,4 @@ -name: CI +name: Github Actions CI on: [push] @@ -17,10 +17,9 @@ jobs: - name: Build image run: | export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}" - echo $GIT_BRANCH docker build \ - --build-arg CI=$CI \ + --build-arg CI=$GITHUB_WORKFLOW \ --build-arg GIT_BRANCH=$GIT_BRANCH \ --build-arg COVERALLS_TOKEN=$COVERALLS_TOKEN \ . From 9c84e7cc6a947aa90a5b997ae1400a603c16713b Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Fri, 20 Sep 2019 11:44:36 +0300 Subject: [PATCH 12/13] Add quotes for env variable value --- .github/workflows/blank.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 7041b1d5a4..eec9411230 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -19,7 +19,7 @@ jobs: export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}" docker build \ - --build-arg CI=$GITHUB_WORKFLOW \ + --build-arg CI="$GITHUB_WORKFLOW" \ --build-arg GIT_BRANCH=$GIT_BRANCH \ --build-arg COVERALLS_TOKEN=$COVERALLS_TOKEN \ . From 4b17afe2642129dfab66b0cc09bacb164251d752 Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Fri, 20 Sep 2019 21:40:36 +0300 Subject: [PATCH 13/13] change on in ci --- .github/workflows/blank.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index eec9411230..6c65ca9caa 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -1,6 +1,9 @@ name: Github Actions CI -on: [push] +on: + push: + branches: + tags: jobs: build: