-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for retrieving data from OCI registries
Several existing registries with OCI support can be detected and the URL will recieve the oci:// protocol. Alternatively, the oci:// protocol can be added to the URL for other (e.g. private) registries. The deis/ORAS library is used to fetch the OCI artifacts from the storage. Signed-off-by: Lennard Eijsackers <[email protected]>
- Loading branch information
Showing
37 changed files
with
743 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
### This builds, packages, signs, performs AV and malware scanning, and | ||
### creates a new GitHub release for the newest version of go-getter. | ||
### The GitHub release step performs the actions outlined in | ||
### release.goreleaser.yml. A release is triggered when a new tag | ||
### is pushed in the format vX.X.X | ||
|
||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.15' | ||
- name: Install hc-codesign | ||
id: codesign | ||
run: | | ||
docker login docker.pkg.github.com -u docker -p $GITHUB_TOKEN && \ | ||
docker pull docker.pkg.github.com/hashicorp/hc-codesign/hc-codesign:$VERSION && \ | ||
echo "::set-output name=image::docker.pkg.github.com/hashicorp/hc-codesign/hc-codesign:$VERSION" | ||
env: | ||
VERSION: v0 | ||
GITHUB_TOKEN: ${{ secrets.CODESIGN_GITHUB_TOKEN }} | ||
- name: Install wget & clamAV antivirus scanner | ||
run : | | ||
sudo apt-get -qq install -y ca-certificates wget clamav | ||
wget --version | ||
- name: Install maldet malware scanner | ||
run: | | ||
wget --no-verbose -O maldet-$VERSION.tar.gz https://github.com/rfxn/linux-malware-detect/archive/$VERSION.tar.gz | ||
sha256sum -c - <<< "$SHA256SUM maldet-$VERSION.tar.gz" | ||
sudo mkdir -p maldet-$VERSION | ||
sudo tar -xzf maldet-$VERSION.tar.gz --strip-components=1 -C maldet-$VERSION | ||
cd maldet-$VERSION | ||
sudo ./install.sh | ||
sudo maldet -u | ||
env: | ||
VERSION: 1.6.4 | ||
SHA256SUM: 3ad66eebd443d32dd6c811dcf2d264b78678c75ed1d40c15434180d4453e60d2 | ||
- name: Import PGP key for archive signing | ||
run: echo -e $PGP_KEY | base64 -di | gpg --import --batch | ||
env: | ||
GPG_TTY: $(tty) | ||
PGP_KEY: ${{ secrets.PGP_SIGNING_KEY }} | ||
- name: GitHub Release | ||
uses: goreleaser/goreleaser-action@v1 | ||
with: | ||
version: latest | ||
args: release --skip-validate --timeout "60m" | ||
env: | ||
PGP_KEY_ID: ${{ secrets.PGP_KEY_ID }} | ||
CODESIGN_IMAGE: ${{ steps.codesign.outputs.image }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }} | ||
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }} | ||
CIRCLE_TOKEN: ${{ secrets.CIRCLE_TOKEN }} | ||
- name: Run clamAV antivirus scanner | ||
run: sudo clamscan /home/runner/work/$REPO/$REPO/dist/ | ||
env: | ||
REPO: ${{ github.event.repository.name }} | ||
- name: Run maldet malware scanner | ||
run: sudo maldet -a /home/runner/work/$REPO/$REPO/dist/ | ||
env: | ||
REPO: ${{ github.event.repository.name }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
before: | ||
hooks: | ||
- go test ./... | ||
|
||
builds: | ||
- id: signable | ||
mod_timestamp: '{{ .CommitTimestamp }}' | ||
targets: | ||
- darwin_amd64 | ||
- windows_386 | ||
- windows_amd64 | ||
hooks: | ||
post: | | ||
docker run | ||
-e ARTIFACTORY_TOKEN={{ .Env.ARTIFACTORY_TOKEN }} | ||
-e ARTIFACTORY_USER={{ .Env.ARTIFACTORY_USER }} | ||
-e CIRCLE_TOKEN={{ .Env.CIRCLE_TOKEN }} | ||
-v {{ dir .Path }}:/workdir | ||
{{ .Env.CODESIGN_IMAGE }} | ||
sign -product-name={{ .ProjectName }} {{ .Name }} | ||
flags: | ||
- -trimpath | ||
ldflags: | ||
- -X main.GitCommit={{ .Commit }} | ||
- mod_timestamp: '{{ .CommitTimestamp }}' | ||
targets: | ||
- linux_386 | ||
- linux_amd64 | ||
flags: | ||
- -trimpath | ||
ldflags: | ||
- -X main.GitCommit={{ .Commit }} | ||
|
||
archives: | ||
- format: zip | ||
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" | ||
files: | ||
- none* | ||
|
||
checksum: | ||
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS' | ||
algorithm: sha256 | ||
|
||
signs: | ||
- args: ["-u", "{{ .Env.PGP_KEY_ID }}", "--output", "${signature}", "--detach-sign", "${artifact}"] | ||
artifacts: checksum | ||
|
||
changelog: | ||
skip: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.