mirror of
https://github.com/k8snetworkplumbingwg/whereabouts.git
synced 2025-06-03 06:42:26 +00:00
commit
860f2fa23d
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@ -5,7 +5,8 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.15.x, 1.16.x]
|
||||
goarch: [386, amd64, arm, ppc64le, arm64]
|
||||
#goarch: [386, amd64, arm, ppc64le, arm64]
|
||||
goarch: [amd64]
|
||||
os: [ubuntu-latest] #, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
@ -17,6 +18,9 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install kubebuilder tools
|
||||
run: ./hack/install-kubebuilder-tools.sh
|
||||
|
||||
- name: Generate code
|
||||
run: ./hack/generate-code.sh
|
||||
|
||||
|
20
.github/workflows/image-push-master.yml
vendored
20
.github/workflows/image-push-master.yml
vendored
@ -16,22 +16,22 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
if: github.repository_owner == ${{ env.image-push-owner }}
|
||||
- name: Login to Container Registry
|
||||
if: github.repository_owner == 'dougbtv'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
#registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.CR_PAT }}
|
||||
|
||||
- name: Push container image
|
||||
if: github.repository_owner == ${{ env.image-push-owner }}
|
||||
if: github.repository_owner == 'dougbtv'
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: dougbtv/whereabouts:latest
|
||||
file: deployments/Dockerfile
|
||||
file: Dockerfile
|
||||
|
||||
push-origin:
|
||||
name: Image push/origin
|
||||
@ -43,19 +43,19 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
if: github.repository_owner == ${{ env.image-push-owner }}
|
||||
- name: Login to Container Registry
|
||||
if: github.repository_owner == 'dougbtv'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
#registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.CR_PAT }}
|
||||
|
||||
- name: Push container image
|
||||
if: github.repository_owner == ${{ env.image-push-owner }}
|
||||
if: github.repository_owner == 'dougbtv'
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: dougbtv/whereabouts-ocp:latest
|
||||
file: deployments/Dockerfile.openshift
|
||||
file: Dockerfile.openshift
|
||||
|
8
.github/workflows/image-push-release.yml
vendored
8
.github/workflows/image-push-release.yml
vendored
@ -16,11 +16,11 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
if: github.repository_owner == ${{ env.image-push-owner }}
|
||||
- name: Login to Container Registry
|
||||
if: github.repository_owner == 'dougbtv'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
#registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.CR_PAT }}
|
||||
|
||||
@ -33,7 +33,7 @@ jobs:
|
||||
tag-latest: false
|
||||
|
||||
- name: Push container image
|
||||
if: github.repository_owner == ${{ env.image-push-owner }}
|
||||
if: github.repository_owner == 'dougbtv'
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
|
11
.github/workflows/test.yml
vendored
11
.github/workflows/test.yml
vendored
@ -4,7 +4,8 @@ jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.15.x, 1.16.x]
|
||||
#go-version: [1.15.x, 1.16.x]
|
||||
go-version: [1.15.x]
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
@ -19,11 +20,8 @@ jobs:
|
||||
- name: Run Revive Action by building from repository
|
||||
uses: morphy2k/revive-action@v1.4.1
|
||||
with:
|
||||
config: revive.toml
|
||||
exclude: "./vendor/..."
|
||||
name: "Revive"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Install kubebuilder tools
|
||||
run: ./hack/install-kubebuilder-tools.sh
|
||||
@ -38,8 +36,11 @@ jobs:
|
||||
- name: Run go vet
|
||||
run: go vet ./...
|
||||
|
||||
- name: Install golint
|
||||
run: GO111MODULE=off GOBIN=$(pwd)/bin go get golang.org/x/lint/golint
|
||||
|
||||
- name: Test
|
||||
run: sudo ./hack/test-go.sh
|
||||
run: sudo PATH=${PATH}:./bin ./hack/test-go.sh
|
||||
|
||||
- name: Send coverage
|
||||
uses: shogo82148/actions-goveralls@v1
|
||||
|
Loading…
Reference in New Issue
Block a user