diff options
author | Paramtamtam <[email protected]> | 2020-12-08 10:53:13 +0500 |
---|---|---|
committer | Paramtamtam <[email protected]> | 2020-12-08 10:53:13 +0500 |
commit | d39cfc438eb8affc39093b7a37cdfd52aad05da7 (patch) | |
tree | 0e6db8ffd07d1d9117022aa3ab16f33256b74943 /.github | |
parent | 96fa83cd47e9e466dbc68ff9f5857f46cb199539 (diff) |
Docker build updated
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/release.yml | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7a15a083..457ac6f0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,7 @@ name: release on: release: # Docs: <https://help.github.com/en/articles/events-that-trigger-workflows#release-event-release> types: [published] + push: # TODO just for a test (remove this line) jobs: build: @@ -39,7 +40,7 @@ jobs: - name: Download dependencies run: go mod download # `-x` means "verbose" mode - - name: Generate compiler values + - name: Generate builder values id: values run: | echo "::set-output name=version::`echo ${GITHUB_REF##*/} | sed -e 's/^[vV ]*//'`" @@ -51,6 +52,7 @@ jobs: GOOS: ${{ matrix.os }} GOARCH: ${{ matrix.arch }} CC: ${{ matrix.compiler }} + CGO_ENABLED: 0 LDFLAGS: >- -s -X github.com/spiral/roadrunner/cmd/rr/cmd.Version=${{ steps.values.outputs.version }} @@ -93,7 +95,8 @@ jobs: if: matrix.archiver == 'zip' run: zip -r -q "${{ steps.dist-arch.outputs.name }}" "${{ steps.dist-dir.outputs.name }}" - - uses: actions/upload-artifact@v2 + - name: Upload artifact + uses: actions/upload-artifact@v2 with: name: ${{ steps.dist-dir.outputs.name }} path: ${{ steps.dist-arch.outputs.name }} @@ -107,3 +110,24 @@ jobs: file: ${{ steps.dist-arch.outputs.name }} asset_name: ${{ steps.dist-arch.outputs.name }} tag: ${{ github.ref }} + + docker: + name: Build docker image + runs-on: ubuntu-20.04 + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Generate builder values + id: values + run: | + echo "::set-output name=version::`echo ${GITHUB_REF##*/} | sed -e 's/^[vV ]*//'`" + echo "::set-output name=timestamp::`date +%FT%T%z`" + + - name: Build image + run: | + docker build \ + --tag rr:local \ + --build-arg "APP_VERSION=${{ steps.values.outputs.version }}" \ + --build-arg "BUILD_TIME=${{ steps.values.outputs.timestamp }}" \ + . |