Skip to content

fix: wrapped some nil panics #80

fix: wrapped some nil panics

fix: wrapped some nil panics #80

Workflow file for this run

# Copyright 2023 UMH Systems GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
name: main
on:
push:
branches:
- '**'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
GO_VERSION: '1.21.*'
jobs:
go-test:
runs-on:
group: large-runners
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: ./.github/actions/setup-go
with:
go_version: ${{ env.GO_VERSION }}
- name: Startup simulator in background
run: |
docker-compose up &
working-directory: tests
- name: Wait for port 50000 to be ready
run: |
while ! nc -z localhost 50000; do
echo "Waiting for port 50000 to be ready..."
sleep 1
done
- name: Test
run: make test
go-test-wago:
runs-on: hercules
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: ./.github/actions/setup-go
with:
go_version: ${{ env.GO_VERSION }}
- name: Test
run: TEST_WAGO_ENDPOINT_URI=${{ secrets.TEST_WAGO_ENDPOINT_URI }} TEST_WAGO_USERNAME=${{ secrets.TEST_WAGO_USERNAME }} TEST_WAGO_PASSWORD=${{ secrets.TEST_WAGO_PASSWORD }} make test
go-build:
runs-on:
group: large-runners
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: ./.github/actions/setup-go
with:
go_version: ${{ env.GO_VERSION }}
- name: Build
uses: goreleaser/goreleaser-action@v3
with:
args: release --skip-publish --skip-sign --snapshot --timeout=60m
- name: Read metadata
id: metadata
uses: juliangruber/read-file-action@v1
with:
path: target/dist/metadata.json
- name: Prepare artifacts
run: |
mkdir -p tmp/bin
cp target/dist/benthos_linux_amd64_v1/benthos tmp/bin/benthos
env:
VERSION: ${{ fromJSON(steps.metadata.outputs.content).version }}
- name: Upload Benthos artifacts
uses: actions/upload-artifact@v3
with:
name: benthos
path: tmp/bin/benthos
retention-days: 2
build:
runs-on:
group: large-runners
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Docker
uses: ./.github/actions/setup-docker
with:
registry_domain: ${{ env.REGISTRY }}
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@v3
with:
push: true
platforms: linux/amd64,linux/arm64
cache-from: 'type=local,src=/tmp/.buildx-cache'
cache-to: 'type=local,dest=/tmp/.buildx-cache'
tags: ghcr.io/${{ github.repository }}:${{ github.sha }}
- name: Remove CI container image
uses: bots-house/[email protected]
if: always()
with:
owner: ${{ github.repository_owner }}
name: ${{ github.event.repository.name }}
tag: ${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}