Skip to content

Bump github.com/spf13/afero from 1.10.0 to 1.11.0 (#317) #72

Bump github.com/spf13/afero from 1.10.0 to 1.11.0 (#317)

Bump github.com/spf13/afero from 1.10.0 to 1.11.0 (#317) #72

Workflow file for this run

name: build
on:
workflow_dispatch: {}
push:
branches:
- "main"
tags:
- 'v*'
pull_request: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum
- name: Set up Mage
run: go run mage.go EnsureMage
- name: VetLint
run: mage -v vet lint
- name: Test
run: mage -v Test
env:
PORTER_TEST_WAIT_TIMEOUT: 2m
- name: Report Unit Test Coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage-unit.out
flags: unittests
- name: Report Integration Test Coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage-integration.out
flags: integration-tests
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ env.MANAGER_IMAGE }}
format: sarif
output: trivy-results.sarif
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: trivy-results.sarif
- name: Login to Docker Hub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USER }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Publish
if: ${{ github.event_name != 'pull_request' }}
run: |
if [[ "${GITHUB_REPOSITORY}" != "getporter/operator" ]]; then
# If publishing from fork PORTER_OPERATOR_REGISTRY
# must be set as a CI env variable and GHCR_USER and GHCR_TOKEN set
# as secrets with permissions to publish images
export PORTER_ENV=fork
export PORTER_OPERATOR_REGISTRY=${{ vars.PORTER_OPERATOR_REGISTRY }}
fi
mage -v Publish
env:
PORTER_ENV: production