Merge pull request #93 from s1061123/fix/gh-actions

Fix github actions
This commit is contained in:
Doug Smith 2021-02-22 11:39:24 -05:00 committed by dougbtv
commit 860f2fa23d
4 changed files with 25 additions and 20 deletions

View File

@ -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

View File

@ -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

View File

@ -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: .

View File

@ -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