Skip to content

promocodes: fix access #1525

promocodes: fix access

promocodes: fix access #1525

Workflow file for this run

name: "Go: Attempt build"
on:
push:
paths:
- .github/workflows/go.test-build.yml
- "**/*.go"
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set target tags
id: set-tags-matrix
run: echo "::set-output name=matrix::$(ls cmd | jq -cnR '[inputs | select(length>0)]')"
- name: Go version
id: go_version
run: echo "::set-output name=version::$(sed -n '3p' go.mod | grep -Eo '\d.\d+')"
outputs:
go_version: ${{ steps.go_version.outputs.version }}
matrix: ${{ steps.set-tags-matrix.outputs.matrix }}
build:
runs-on: ubuntu-latest
needs: [prepare]
strategy:
matrix:
dir: ${{fromJson(needs.prepare.outputs.matrix)}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Go Modules
run: go mod download
- name: Attempt build
run: go build -ldflags="-s -w" -buildvcs=false ./cmd/${{ matrix.dir }}
env:
CGO_ENABLED: 0