From 537285b0b1a615a51dd82fd6f9c5dbe9aa02ecb5 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Sun, 13 Feb 2022 16:02:32 +0100 Subject: [PATCH] chore: clean workflow --- .github/workflows/main.yml | 22 ------------------ .github/workflows/release.yml | 44 +++++++++++++++++++++++++++++++++++ .gitignore | 1 + 3 files changed, 45 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8a84367..e6afbeb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,8 +4,6 @@ on: push: branches: - master - tags: - - v* pull_request: jobs: @@ -16,7 +14,6 @@ jobs: env: GO_VERSION: 1.17 GOLANGCI_LINT_VERSION: v1.44.0 - SEIHON_VERSION: v0.9.0 CGO_ENABLED: 0 steps: @@ -59,22 +56,3 @@ jobs: - name: Make Image run: make image - - # Install Docker image multi-arch builder - - name: Install seihon ${{ env.SEIHON_VERSION }} - if: startsWith(github.ref, 'refs/tags/v') - run: | - curl -sSfL https://raw.githubusercontent.com/ldez/seihon/master/godownloader.sh | sh -s -- -b $(go env GOPATH)/bin ${SEIHON_VERSION} - seihon --version - - - name: Docker Login - if: startsWith(github.ref, 'refs/tags/v') - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - run: | - echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin - - - name: Deploy Docker Images (seihon) - if: startsWith(github.ref, 'refs/tags/v') - run: make publish-images diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..914a7c7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: "Release a tag" +on: + push: + tags: + - v* + +jobs: + release: + name: Release Process + runs-on: ubuntu-latest + env: + GO_VERSION: 1.17 + SEIHON_VERSION: v0.9.0 + CGO_ENABLED: 0 + + steps: + + # https://github.com/marketplace/actions/setup-go-environment + - name: Set up Go ${{ env.GO_VERSION }} + uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + + # https://github.com/marketplace/actions/checkout + - name: Check out code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + # Install Docker image multi-arch builder + - name: Install seihon ${{ env.SEIHON_VERSION }} + run: | + curl -sSfL https://raw.githubusercontent.com/ldez/seihon/master/godownloader.sh | sh -s -- -b $(go env GOPATH)/bin ${SEIHON_VERSION} + seihon --version + + - name: Docker Login + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + run: | + echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin + + - name: Deploy Docker Images (seihon) + run: make publish-images diff --git a/.gitignore b/.gitignore index 770da04..e954fa9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .idea vendor/ /whoami +dist/