name: Build gopass-hibp on: push: branches: [ master ] pull_request: branches: [ master ] jobs: linux: runs-on: ubuntu-latest steps: - name: Harden Runner uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3 with: egress-policy: block allowed-endpoints: > github.com:443 objects.githubusercontent.com:443 proxy.golang.org:443 raw.githubusercontent.com:443 storage.googleapis.com:443 sum.golang.org:443 golang.org:443 go.dev:443 azure.archive.ubuntu.com:443 archive.ubuntu.com:443 security.ubuntu.com:443 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: fetch-depth: 0 - name: Set up Go uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 with: go-version: '1.24' - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - name: Ubuntu Dependencies run: sudo apt-get install --yes git gnupg - run: git config --global user.name nobody - run: git config --global user.email foo.bar@example.org - name: Debug run: | echo "Go env ------------------" pwd echo ${HOME} echo ${GITHUB_WORKSPACE} echo ${GOPATH} echo ${GOROOT} env - name: Build and Unit Test run: make gha-linux windows: runs-on: windows-latest defaults: run: shell: msys2 {0} steps: - name: Harden Runner uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3 with: egress-policy: audit - uses: msys2/setup-msys2@fb197b72ce45fb24f17bf3f807a388985654d1f2 # v2.29.0 with: release: false path-type: inherit install: >- base-devel git - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: fetch-depth: 0 - name: Set up Go uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 with: go-version: '1.24' - run: git config --global user.name nobody - run: git config --global user.email foo.bar@example.org - name: Build and Unit Test run: make gha-windows macos: runs-on: macos-latest steps: - name: Harden Runner uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3 with: egress-policy: audit - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: fetch-depth: 0 - name: Set up Go uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 with: go-version: '1.24' - name: MacOS Dependencies run: brew install git gnupg - run: git config --global user.name nobody - run: git config --global user.email foo.bar@example.org - name: Build and Unit Test run: make gha-osx env: SLOW_TEST_FACTOR: 100 dependabot: needs: [linux] runs-on: ubuntu-latest permissions: pull-requests: write contents: write if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} steps: - id: metadata uses: dependabot/fetch-metadata@v2 with: github-token: "${{ secrets.GITHUB_TOKEN }}" - run: | gh pr review --approve "$PR_URL" gh pr merge --squash --auto "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}