Skip to content

Commit

Permalink
senzing-factory/build-resources#15 update go workflow permissions (#16)
Browse files Browse the repository at this point in the history
* senzing-factory/build-resources#15 update go workflow permissions

* senzing-factory/build-resources#15 update go workflow permissions
  • Loading branch information
kernelsam authored Jan 26, 2024
1 parent c02294f commit c93b840
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 31 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/go-proxy-pull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@
# - https://futurestud.io/tutorials/github-actions-run-a-workflow-when-creating-a-tag

name: go-proxy-pull.yaml

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

permissions:
contents: write

jobs:
go-proxy-pull:
runs-on: ubuntu-latest
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/go-test-linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Based on
# - https://github.com/marketplace/actions/setup-go-environment

name: go-test.yaml

on: [push]

permissions:
contents: read

jobs:
go-test-linux:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: ["1.21"]
os: [ubuntu-latest]
name: "go test with OS: ${{ matrix.os }}; Go: ${{ matrix.go }}"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Run go test
run: go test -v -p 1 ./...
22 changes: 0 additions & 22 deletions .github/workflows/go-test.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
# Based on
# - https://github.com/securego/gosec
name: 'gosec'

name: go-security.yaml
on:
push:
branches:
- main
pull_request:
branches:
- main

on: [push]
permissions:
contents: read

jobs:
tests:
gosec:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Checkout Source
uses: actions/checkout@v4

- name: Run Gosec Security Scanner
uses: securego/gosec@master
uses: securego/gosec@v2.18.2
with:
args: ./...
11 changes: 8 additions & 3 deletions .github/workflows/make-go-tag.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
name: make-go-tag.yaml
name: 'make go tag'

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
permissions: write-all

permissions:
contents: write

jobs:
make-go-tag:
name: Make a vM.m.P tag
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Make go version tag
uses: senzing-factory/github-action-make-go-tag@main
uses: senzing-factory/github-action-make-go-tag@v1

0 comments on commit c93b840

Please sign in to comment.