Debian Codegraph @

.github/workflows/build.yml

raw symbols SCIP
1 name: Build gopass-hibp
2
3 on:
4 push:
5 branches: [ master ]
6 pull_request:
7 branches: [ master ]
8
9 jobs:
10
11 linux:
12 runs-on: ubuntu-latest
13 steps:
14 - name: Harden Runner
15 uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
16 with:
17 egress-policy: block
18 allowed-endpoints: >
19 github.com:443
20 objects.githubusercontent.com:443
21 proxy.golang.org:443
22 raw.githubusercontent.com:443
23 storage.googleapis.com:443
24 sum.golang.org:443
25 golang.org:443
26 go.dev:443
27 azure.archive.ubuntu.com:443
28 archive.ubuntu.com:443
29 security.ubuntu.com:443
30 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
31 with:
32 fetch-depth: 0
33
34 - name: Set up Go
35 uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
36 with:
37 go-version: '1.24'
38 - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
39 with:
40 path: ~/go/pkg/mod
41 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
42 restore-keys: |
43 ${{ runner.os }}-go-
44 - name: Ubuntu Dependencies
45 run: sudo apt-get install --yes git gnupg
46 - run: git config --global user.name nobody
47 - run: git config --global user.email [email protected]
48
49 -
50 name: Debug
51 run: |
52 echo "Go env ------------------"
53 pwd
54 echo ${HOME}
55 echo ${GITHUB_WORKSPACE}
56 echo ${GOPATH}
57 echo ${GOROOT}
58 env
59
60 - name: Build and Unit Test
61 run: make gha-linux
62
63 windows:
64 runs-on: windows-latest
65 defaults:
66 run:
67 shell: msys2 {0}
68 steps:
69 - name: Harden Runner
70 uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
71 with:
72 egress-policy: audit
73
74 - uses: msys2/setup-msys2@fb197b72ce45fb24f17bf3f807a388985654d1f2 # v2.29.0
75 with:
76 release: false
77 path-type: inherit
78 install: >-
79 base-devel
80 git
81
82 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
83 with:
84 fetch-depth: 0
85
86 - name: Set up Go
87 uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
88 with:
89 go-version: '1.24'
90
91 - run: git config --global user.name nobody
92 - run: git config --global user.email [email protected]
93
94 - name: Build and Unit Test
95 run: make gha-windows
96
97 macos:
98 runs-on: macos-latest
99 steps:
100 - name: Harden Runner
101 uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
102 with:
103 egress-policy: audit
104
105 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
106 with:
107 fetch-depth: 0
108
109 - name: Set up Go
110 uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
111 with:
112 go-version: '1.24'
113
114 - name: MacOS Dependencies
115 run: brew install git gnupg
116
117 - run: git config --global user.name nobody
118 - run: git config --global user.email [email protected]
119
120 - name: Build and Unit Test
121 run: make gha-osx
122 env:
123 SLOW_TEST_FACTOR: 100
124
125 dependabot:
126 needs: [linux]
127 runs-on: ubuntu-latest
128 permissions:
129 pull-requests: write
130 contents: write
131 if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
132 steps:
133 - id: metadata
134 uses: dependabot/fetch-metadata@v2
135 with:
136 github-token: "${{ secrets.GITHUB_TOKEN }}"
137 - run: |
138 gh pr review --approve "$PR_URL"
139 gh pr merge --squash --auto "$PR_URL"
140 env:
141 PR_URL: ${{github.event.pull_request.html_url}}
142 GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}