Skip to content

feat: add support for streaming container logs from services #546

feat: add support for streaming container logs from services

feat: add support for streaming container logs from services #546

Workflow file for this run

name: Lagoon CLI Test
on:
push:
branches:
- main
tags:
- 'v*.*.*'
pull_request:
branches:
- 'main'
jobs:
test-suite:
runs-on: ubuntu-latest
strategy:
matrix:
goversion:
- 1.21
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: "0"
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{matrix.goversion}}
- name: Build
run: |
go install github.com/golang/mock/[email protected]
ARTIFACT_DESTINATION=./builds make build
# - name: Check version
# run: |
# ./builds/lagoon --version
docker:
needs: test-suite
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: "0"
-
name: Set tag version for build
if: "!startsWith(github.ref, 'refs/tags/')"
id: version_tag_build
run: |
VERSION=$(echo $(git describe --abbrev=0 --tags)+$(git rev-parse --short=8 HEAD))
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "tag is $VERSION"
-
name: Set tag version for tag
if: "startsWith(github.ref, 'refs/tags/')"
id: version_tag
run: |
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "tag is $VERSION"
-
name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
${{ github.repository_owner }}/lagoon-cli
ghcr.io/${{ github.repository_owner }}/lagoon-cli
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
build-args: VERSION=${{ env.VERSION}}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}