forked from trufflesecurity/trufflehog
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (38 loc) · 1.29 KB
/
go-vendor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# This workflow will download the go dependencies for the project
# then compress and release the resulting vendor tarball
# see https://wiki.gentoo.org/wiki/Writing_go_Ebuilds
name: Create Go Vendor Tarball
env:
TAR_REPRO_OPTS: '"--mtime=2023-01-01 00:00 UTC" --sort=name --owner=0 --group=0 --numeric-owner'
TAR_NAME: ${{ github.event.repository.name }}-${{ github.ref_name }}-vendor.tar.xz
CHECKOUT_DIR: ${{ github.event.repository.name }}-${{ github.ref_name }}
on:
push:
tags:
- '*'
jobs:
vendor-tarball:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: ${{ env.CHECKOUT_DIR }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
cache-dependency-path: ${{ env.CHECKOUT_DIR }}/go.sum
- name: fetch deps
run: go mod vendor
working-directory: ${{ env.CHECKOUT_DIR }}
- name: compress vendor
run: >
tar ${{ env.TAR_REPRO_OPTS }} -caf ${{ env.TAR_NAME }}
${{ env.CHECKOUT_DIR }}/vendor
- name: release
uses: softprops/[email protected]
with:
files: ${{ env.TAR_NAME }}
body: Go vendor tarball for Gentoo Linux overlay package
generate_release_notes: false
fail_on_unmatched_files: true