Skip to content

Commit

Permalink
Update CI configs to v0.10.1
Browse files Browse the repository at this point in the history
Update lint scripts and CI configs.
  • Loading branch information
pionbot authored and at-wat committed Jan 20, 2023
1 parent d0f27fe commit 3a6f531
Show file tree
Hide file tree
Showing 20 changed files with 109 additions and 633 deletions.
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.goassets
29 changes: 29 additions & 0 deletions .github/fetch-scripts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh

#
# DO NOT EDIT THIS FILE
#
# It is automatically copied from https://github.com/pion/.goassets repository.
#
# If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository.
#

set -eu

SCRIPT_PATH="$(realpath "$(dirname "$0")")"
GOASSETS_PATH="${SCRIPT_PATH}/.goassets"

GOASSETS_REF=${GOASSETS_REF:-master}

if [ -d "${GOASSETS_PATH}" ]; then
if ! git -C "${GOASSETS_PATH}" diff --exit-code; then
echo "${GOASSETS_PATH} has uncommitted changes" >&2
exit 1
fi
git -C "${GOASSETS_PATH}" fetch origin
git -C "${GOASSETS_PATH}" checkout ${GOASSETS_REF}
git -C "${GOASSETS_PATH}" reset --hard origin/${GOASSETS_REF}
else
git clone -b ${GOASSETS_REF} https://github.com/pion/.goassets.git "${GOASSETS_PATH}"
fi
69 changes: 0 additions & 69 deletions .github/generate-authors.sh

This file was deleted.

11 changes: 0 additions & 11 deletions .github/hooks/commit-msg.sh

This file was deleted.

13 changes: 0 additions & 13 deletions .github/hooks/pre-commit.sh

This file was deleted.

13 changes: 0 additions & 13 deletions .github/hooks/pre-push.sh

This file was deleted.

12 changes: 7 additions & 5 deletions .github/install-hooks.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

#
# DO NOT EDIT THIS FILE
Expand All @@ -9,8 +9,10 @@
# https://github.com/pion/.goassets instead of this repository.
#

SCRIPT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
SCRIPT_PATH="$(realpath "$(dirname "$0")")"

cp "${SCRIPT_PATH}/hooks/commit-msg.sh" "${SCRIPT_PATH}/../.git/hooks/commit-msg"
cp "${SCRIPT_PATH}/hooks/pre-commit.sh" "${SCRIPT_PATH}/../.git/hooks/pre-commit"
cp "${SCRIPT_PATH}/hooks/pre-push.sh" "${SCRIPT_PATH}/../.git/hooks/pre-push"
. ${SCRIPT_PATH}/fetch-scripts.sh

cp "${GOASSETS_PATH}/hooks/commit-msg.sh" "${SCRIPT_PATH}/../.git/hooks/commit-msg"
cp "${GOASSETS_PATH}/hooks/pre-commit.sh" "${SCRIPT_PATH}/../.git/hooks/pre-commit"
cp "${GOASSETS_PATH}/hooks/pre-push.sh" "${SCRIPT_PATH}/../.git/hooks/pre-push"
64 changes: 0 additions & 64 deletions .github/lint-commit-message.sh

This file was deleted.

43 changes: 0 additions & 43 deletions .github/lint-disallowed-functions-in-library.sh

This file was deleted.

24 changes: 0 additions & 24 deletions .github/lint-filename.sh

This file was deleted.

37 changes: 0 additions & 37 deletions .github/lint-no-trailing-newline-in-log-messages.sh

This file was deleted.

40 changes: 13 additions & 27 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
name: "CodeQL"
#
# DO NOT EDIT THIS FILE
#
# It is automatically copied from https://github.com/pion/.goassets repository.
# If this repository should have package specific CI config,
# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
#
# If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository.
#

name: CodeQL

on:
workflow_dispatch:
Expand All @@ -12,29 +23,4 @@ on:

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- name: Checkout repo
uses: actions/checkout@v3

# The code in examples/ might intentionally do things like log credentials
# in order to show how the library is used, aid in debugging etc. We
# should ignore those for CodeQL scanning, and only focus on the package
# itself.
- name: Remove example code
run: |
rm -rf examples/
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: 'go'

- name: CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: pion/.goassets/.github/workflows/codeql-analysis.reusable.yml@master

0 comments on commit 3a6f531

Please sign in to comment.