diff --git a/.github/workflows/make-all.yml b/.github/workflows/make-all.yml new file mode 100644 index 00000000..4f942aca --- /dev/null +++ b/.github/workflows/make-all.yml @@ -0,0 +1,13 @@ +on: push +name: make all +jobs: + makeall: + name: make all + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: make all + uses: docker://golang:latest + with: + entrypoint: bash + args: -c "go get honnef.co/go/tools/cmd/staticcheck && go get golang.org/x/lint/golint && make fmt lint staticcheck vet install" diff --git a/.github/workflows/make-image.yml b/.github/workflows/make-image.yml new file mode 100644 index 00000000..dcbe794c --- /dev/null +++ b/.github/workflows/make-image.yml @@ -0,0 +1,11 @@ +on: push +name: make image +jobs: + makeimage: + name: make image + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: make image + run: make image + shell: bash diff --git a/.github/workflows/make-release.yml b/.github/workflows/make-release.yml new file mode 100644 index 00000000..3cb30870 --- /dev/null +++ b/.github/workflows/make-release.yml @@ -0,0 +1,29 @@ +on: + push: + tags: + - v* +name: make release +jobs: + makerelease: + name: make release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: make release + uses: docker://golang:latest + with: + args: make release + - name: upload assets + uses: docker://r.j3ss.co/github-dev + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + entrypoint: bash + args: -c "upload-assets ./cross/*" + - name: update release body + uses: docker://r.j3ss.co/pepper + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + entrypoint: sh + args: -c "pepper release --repo $GITHUB_REPOSITORY -d --nouser" diff --git a/.github/workflows/make-test.yml b/.github/workflows/make-test.yml new file mode 100644 index 00000000..f28a7ace --- /dev/null +++ b/.github/workflows/make-test.yml @@ -0,0 +1,11 @@ +on: push +name: make test +jobs: + maketest: + name: make test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: make test + run: DOCKER_API_VERSION=1.39 make dind dtest + shell: bash diff --git a/.github/workflows/toc.yml b/.github/workflows/toc.yml new file mode 100644 index 00000000..888701ea --- /dev/null +++ b/.github/workflows/toc.yml @@ -0,0 +1,15 @@ +on: + push: + branches: + - master # Push events on master branch +name: Table of Contents Generator +jobs: + generateTOC: + name: TOC Generator + runs-on: ubuntu-latest + steps: + - name: TOC Generator + uses: technote-space/toc-generator@v1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TARGET_PATHS: "README.md" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 07887521..00000000 --- a/.travis.yml +++ /dev/null @@ -1,56 +0,0 @@ -language: go -sudo: true -services: - - docker -go: - - 1.11.x -before_install: - - go get golang.org/x/lint/golint - - go get honnef.co/go/tools/cmd/staticcheck -jobs: - include: - - script: - - make fmt lint staticcheck vet install - - DOCKER_API_VERSION=1.39 make dind dtest - - stage: Build Release - script: - - make release - - echo "Deploying to GitHub releases ..." - deploy: - provider: releases - file: - - cross/reg-darwin-amd64 - - cross/reg-darwin-amd64.md5 - - cross/reg-darwin-amd64.sha256 - - cross/reg-darwin-386 - - cross/reg-darwin-386.md5 - - cross/reg-darwin-386.sha256 - - cross/reg-freebsd-amd64 - - cross/reg-freebsd-amd64.md5 - - cross/reg-freebsd-amd64.sha256 - - cross/reg-freebsd-386 - - cross/reg-freebsd-386.md5 - - cross/reg-freebsd-386.sha256 - - cross/reg-linux-arm - - cross/reg-linux-arm.md5 - - cross/reg-linux-arm.sha256 - - cross/reg-linux-arm64 - - cross/reg-linux-arm64.md5 - - cross/reg-linux-arm64.sha256 - - cross/reg-linux-amd64 - - cross/reg-linux-amd64.md5 - - cross/reg-linux-amd64.sha256 - - cross/reg-linux-386 - - cross/reg-linux-386.md5 - - cross/reg-linux-386.sha256 - - cross/reg-windows-amd64 - - cross/reg-windows-amd64.md5 - - cross/reg-windows-amd64.sha256 - - cross/reg-windows-386 - - cross/reg-windows-386.md5 - - cross/reg-windows-386.sha256 - skip_cleanup: true - on: - tags: true - api_key: - secure: "TTOf5iX7bX9i2t5S8RoYdQ4w07vcc5gRoO2B7DzwmLsaMhWRi/bwOh7A2b77apaT1Mc6YytYlkqEqve/W8YTeWhJRZSevtN1GmSv1Hkryu8t5b53SFba1ka0/FVG0qTO0d7NT5JUx8C7Yw1ZZhfW2oJCt9nZWIYT/5JFLm21prdOHTsUIc7XUnXa5etFAbMxMU8c6sz42m2zEkfTgv59DNeaF754W40pDWsayI1zjZYiHImdSdueNzNrhaSIp8AYF5dVXJgYAltYx38Af6XY77sJ+/jpCYONA8BDYygppibdtwFsVjLr1sXv7c2p1p8yZNblj37RyH3DYHCki8pXyZm87jqATiNJromvFVx5oGDpNzd+jCHHidrb7+cOIEepYE8DKMh0+q5N/hVJWR3nUzVeerfgxuNiGxYbQtxz5ZPXUFCkBLrj38fOuxPeupJdbB8LCRdljHEcoDMCSlHMDyCFseZwBSAkgRGMuVO7LDi2fa/ykL3rugG9oOnUvRjWzAAyp9TRKNvSvk7xIce6va7TfzA9Baah2eHuS07XnZDWgfL04mToiuWnZs01wPNf5HsPjgKxPwwGWYP+S3zIdWwX8fyrxfriguu6xSBytM7VDhtPD/sFXluVGIEf5tEsWL+pI9nfEMYxsaDgIE8MTtj37miKuy9aSTOOeiYBVXs=" diff --git a/.traviskey b/.traviskey deleted file mode 100644 index 6f46b24a..00000000 --- a/.traviskey +++ /dev/null @@ -1 +0,0 @@ -TTOf5iX7bX9i2t5S8RoYdQ4w07vcc5gRoO2B7DzwmLsaMhWRi/bwOh7A2b77apaT1Mc6YytYlkqEqve/W8YTeWhJRZSevtN1GmSv1Hkryu8t5b53SFba1ka0/FVG0qTO0d7NT5JUx8C7Yw1ZZhfW2oJCt9nZWIYT/5JFLm21prdOHTsUIc7XUnXa5etFAbMxMU8c6sz42m2zEkfTgv59DNeaF754W40pDWsayI1zjZYiHImdSdueNzNrhaSIp8AYF5dVXJgYAltYx38Af6XY77sJ+/jpCYONA8BDYygppibdtwFsVjLr1sXv7c2p1p8yZNblj37RyH3DYHCki8pXyZm87jqATiNJromvFVx5oGDpNzd+jCHHidrb7+cOIEepYE8DKMh0+q5N/hVJWR3nUzVeerfgxuNiGxYbQtxz5ZPXUFCkBLrj38fOuxPeupJdbB8LCRdljHEcoDMCSlHMDyCFseZwBSAkgRGMuVO7LDi2fa/ykL3rugG9oOnUvRjWzAAyp9TRKNvSvk7xIce6va7TfzA9Baah2eHuS07XnZDWgfL04mToiuWnZs01wPNf5HsPjgKxPwwGWYP+S3zIdWwX8fyrxfriguu6xSBytM7VDhtPD/sFXluVGIEf5tEsWL+pI9nfEMYxsaDgIE8MTtj37miKuy9aSTOOeiYBVXs= diff --git a/README.md b/README.md index 3b1b661f..3c93191a 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,15 @@ # reg -[![Travis CI](https://img.shields.io/travis/genuinetools/reg.svg?style=for-the-badge)](https://travis-ci.org/genuinetools/reg) +![make-all](https://github.com/genuinetools/reg/workflows/make%20all/badge.svg) +![make-image](https://github.com/genuinetools/reg/workflows/make%20image/badge.svg) +![make-test](https://github.com/genuinetools/reg/workflows/make%20test/badge.svg) [![GoDoc](https://img.shields.io/badge/godoc-reference-5272B4.svg?style=for-the-badge)](https://godoc.org/github.com/genuinetools/reg) [![Github All Releases](https://img.shields.io/github/downloads/genuinetools/reg/total.svg?style=for-the-badge)](https://github.com/genuinetools/reg/releases) Docker registry v2 command line client and repo listing generator with security checks. -**Table of Contents** - - - -- [Installation](#installation) - + [Binaries](#binaries) - + [Via Go](#via-go) -- [Usage](#usage) - * [Auth](#auth) - * [List Repositories and Tags](#list-repositories-and-tags) - * [Get a Manifest](#get-a-manifest) - * [Get the Digest](#get-the-digest) - * [Download a Layer](#download-a-layer) - * [Delete an Image](#delete-an-image) - * [Vulnerability Reports](#vulnerability-reports) - * [Generating Static Website for a Registry](#generating-static-website-for-a-registry) - * [Using Self-Signed Certs with a Registry](#using-self-signed-certs-with-a-registry) -- [Contributing](#contributing) - - + + ## Installation @@ -283,4 +267,4 @@ against an insecure registry. **OR** Run `make dind dtest` to avoid having to change your local docker config and -to run the tests as docker-in-docker. \ No newline at end of file +to run the tests as docker-in-docker. diff --git a/basic.mk b/basic.mk index 61567b5b..cb9b8815 100644 --- a/basic.mk +++ b/basic.mk @@ -137,7 +137,7 @@ release: *.go VERSION.txt prebuild ## Builds the cross-compiled binaries, naming .PHONY: bump-version BUMP := patch bump-version: ## Bump the version in the version file. Set BUMP to [ patch | major | minor ]. - @$(GO) get -u github.com/jessfraz/junk/sembump # update sembump tool + @$(GO) get -u github.com/jessfraz/junk/sembump || true # update sembump tool $(eval NEW_VERSION = $(shell sembump --kind $(BUMP) $(VERSION))) @echo "Bumping VERSION.txt from $(VERSION) to $(NEW_VERSION)" echo $(NEW_VERSION) > VERSION.txt @@ -150,7 +150,7 @@ bump-version: ## Bump the version in the version file. Set BUMP to [ patch | maj .PHONY: tag tag: ## Create a new git tag to prepare to build a release. git tag -sa $(VERSION) -m "$(VERSION)" - @echo "Run git push origin $(VERSION) to push your new tag to GitHub and trigger a travis build." + @echo "Run git push origin $(VERSION) to push your new tag to GitHub and trigger a release." REGISTRY := r.j3ss.co .PHONY: image