Merge pull request #3805 from crazy-max/update-gha

ci: update github actions
This commit is contained in:
Milos Gajdos 2022-11-27 10:56:15 +00:00 committed by GitHub
commit b9f9073d1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 71 additions and 69 deletions

View file

@ -1,5 +1,9 @@
name: build name: build
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on: on:
push: push:
branches: branches:
@ -8,8 +12,6 @@ on:
tags: tags:
- 'v*' - 'v*'
pull_request: pull_request:
branches:
- '*'
env: env:
DOCKERHUB_SLUG: distribution/distribution DOCKERHUB_SLUG: distribution/distribution
@ -49,13 +51,13 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- -
name: Docker meta name: Docker meta
id: meta id: meta
uses: docker/metadata-action@v3 uses: docker/metadata-action@v4
with: with:
images: | images: |
${{ env.DOCKERHUB_SLUG }} ${{ env.DOCKERHUB_SLUG }}
@ -80,17 +82,17 @@ jobs:
org.opencontainers.image.description=The toolkit to pack, ship, store, and deliver container content org.opencontainers.image.description=The toolkit to pack, ship, store, and deliver container content
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v2
- -
name: Login to DockerHub name: Login to DockerHub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v1 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Build artifacts name: Build artifacts
uses: docker/bake-action@v1 uses: docker/bake-action@v2
with: with:
targets: artifact-all targets: artifact-all
- -
@ -99,14 +101,14 @@ jobs:
mv ./bin/**/* ./bin/ mv ./bin/**/* ./bin/
- -
name: Upload artifacts name: Upload artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: registry name: registry
path: ./bin/* path: ./bin/*
if-no-files-found: error if-no-files-found: error
- -
name: Build image name: Build image
uses: docker/bake-action@v1 uses: docker/bake-action@v2
with: with:
files: | files: |
./docker-bake.hcl ./docker-bake.hcl

View file

@ -1,63 +1,48 @@
# For most projects, this workflow file will not need changing; you simply need name: CodeQL
# to commit it to your repository.
# concurrency:
# You may wish to alter this file to override the set of languages analyzed, group: ${{ github.workflow }}-${{ github.ref }}
# or to provide custom queries or build logic. cancel-in-progress: true
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on: on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule: schedule:
- cron: '41 13 * * 1' - cron: '0 12 * * 6'
push:
branches:
- 'main'
- 'release/*'
tags:
- 'v*'
pull_request:
jobs: jobs:
analyze: analyze:
name: Analyze name: Analyze
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
language: [ 'go' ] language:
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - go
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps: steps:
- name: Checkout repository -
uses: actions/checkout@v2 name: Checkout
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning. with:
- name: Initialize CodeQL fetch-depth: 2
uses: github/codeql-action/init@v1 -
with: name: Checkout HEAD on PR
languages: ${{ matrix.language }} if: ${{ github.event_name == 'pull_request' }}
# If you wish to specify custom queries, you can do so here or in a config file. run: |
# By default, queries listed here will override any specified in a config file. git checkout HEAD^2
# Prefix the list here with "+" to use these queries and those in the config file. -
# queries: ./path/to/local/query, your-org/your-repo/queries@main name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
# Command-line programs to run using the OS shell. languages: ${{ matrix.language }}
# 📚 https://git.io/JvXDl -
name: Autobuild
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines uses: github/codeql-action/autobuild@v2
# and modify them (or add more) to build your code if your project -
# uses a compiled language name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View file

@ -1,5 +1,9 @@
name: conformance name: conformance
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on: on:
pull_request: pull_request:
push: push:
@ -10,12 +14,12 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- -
name: Build image name: Build image
uses: docker/bake-action@v1 uses: docker/bake-action@v2
with: with:
targets: image-local targets: image-local
- -
@ -42,7 +46,7 @@ jobs:
run: mkdir -p .out/ && mv {report.html,junit.xml} .out/ run: mkdir -p .out/ && mv {report.html,junit.xml} .out/
- -
name: Upload test results name: Upload test results
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: oci-test-results-${{ github.sha }} name: oci-test-results-${{ github.sha }}
path: .out/ path: .out/

View file

@ -1,12 +1,15 @@
name: e2e name: e2e
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on: on:
push: push:
branches: branches:
- main - 'main'
- 'release/*'
pull_request: pull_request:
branches:
- main
jobs: jobs:
run-e2e-test: run-e2e-test:
@ -14,12 +17,12 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- -
name: Build image name: Build image
uses: docker/bake-action@v1 uses: docker/bake-action@v2
with: with:
targets: image-local targets: image-local
- -

View file

@ -1,5 +1,9 @@
name: FOSSA License Scanning name: FOSSA License Scanning
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on: on:
- pull_request - pull_request
- push - push
@ -10,7 +14,7 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Run FOSSA scan and upload build data - name: Run FOSSA scan and upload build data
uses: fossa-contrib/fossa-action@v1 uses: fossa-contrib/fossa-action@v1

View file

@ -1,5 +1,9 @@
name: validate name: validate
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on: on:
push: push:
branches: branches: