fix pipeline
This commit is contained in:
parent
0ebe1e19d5
commit
13f8e86d50
4 changed files with 9 additions and 138 deletions
73
.github/workflows/codeql-analysis.yml
vendored
73
.github/workflows/codeql-analysis.yml
vendored
|
|
@ -1,73 +0,0 @@
|
|||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '20 2 * * 5'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'go' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
21
.github/workflows/go.yml
vendored
21
.github/workflows/go.yml
vendored
|
|
@ -32,22 +32,17 @@ jobs:
|
|||
with:
|
||||
setAllVars: true
|
||||
|
||||
# - name: golangci-lint
|
||||
# uses: golangci/golangci-lint-action@v3
|
||||
# with:
|
||||
# args: --timeout=10m -E gofmt
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
set -e
|
||||
|
||||
go build -o sshpiperd
|
||||
./sshpiperd version
|
||||
working-directory: sshpiperd
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
args: --timeout=10m -E gofmt
|
||||
|
||||
- name: Test
|
||||
run: go test -v -race -cover ./...
|
||||
working-directory: crypto/ssh
|
||||
|
||||
- name: Test
|
||||
run: go test -v -race -cover ./...
|
||||
working-directory: sshpiperd
|
||||
|
||||
- name: create release
|
||||
env:
|
||||
|
|
|
|||
51
.github/workflows/snap.yaml
vendored
51
.github/workflows/snap.yaml
vendored
|
|
@ -1,51 +0,0 @@
|
|||
name: Snap package
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["E2E"]
|
||||
types: [completed]
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
|
||||
snap:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: 'recursive'
|
||||
|
||||
|
||||
- uses: dotnet/nbgv@master
|
||||
with:
|
||||
setAllVars: true
|
||||
|
||||
- name: set ver
|
||||
uses: mikefarah/yq@master
|
||||
with:
|
||||
cmd: yq -i '.version = "${{ env.NBGV_SimpleVersion }}"' sshpiperd/snap/snapcraft.yaml
|
||||
|
||||
- name: Dep
|
||||
env:
|
||||
SNAP_SECRET: ${{ secrets.snap }}
|
||||
run: |
|
||||
set -e
|
||||
|
||||
sudo snap install snapcraft --classic
|
||||
echo $SNAP_SECRET | base64 -d > secret
|
||||
snap run snapcraft login --with secret
|
||||
|
||||
- name: snap
|
||||
run: |
|
||||
docker-compose build --build-arg VER=$NBGV_SimpleVersion
|
||||
docker-compose up --no-build --abort-on-container-exit
|
||||
|
||||
working-directory: sshpiperd/snap
|
||||
|
||||
- name: push
|
||||
run: snap run snapcraft push *.snap
|
||||
working-directory: sshpiperd/snap
|
||||
|
|
@ -57,7 +57,7 @@ func main() {
|
|||
|
||||
log.Infof("search public key in path: %v", path)
|
||||
if err != nil {
|
||||
log.Infof("error walking path: ", err)
|
||||
log.Infof("error walking path: %v", err)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue