ci: update github actions

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2022-08-20 15:55:20 +02:00
parent 90412400cd
commit d598646f11
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
5 changed files with 48 additions and 88 deletions

View File

@ -12,7 +12,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
@ -25,15 +25,15 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
-
name: Run ${{ matrix.target }}
uses: docker/bake-action@v1
uses: docker/bake-action@v2
with:
targets: ${{ matrix.target }}
env:
@ -55,23 +55,23 @@ jobs:
fi
-
name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ./build/*
if-no-files-found: error
plugins:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
-
name: Build plugins
uses: docker/bake-action@v1
uses: docker/bake-action@v2
with:
targets: plugins-cross

View File

@ -1,16 +1,6 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
name: codeql
on:
# push:
# branches: [master]
# pull_request:
# # The branches below must be a subset of the branches above
# branches: [master]
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
@ -24,57 +14,27 @@ on:
- cron: '0 9 * * 4'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['go']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
codeql:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
-
name: Checkout
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
-
name: Checkout HEAD on PR
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
run: |
git checkout HEAD^2
-
name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# 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
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
languages: go
-
name: Autobuild
uses: github/codeql-action/autobuild@v2
-
name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

View File

@ -12,7 +12,7 @@ on:
jobs:
e2e:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
@ -32,7 +32,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
-
name: Update daemon.json
run: |
@ -44,7 +44,7 @@ jobs:
docker info
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
-
name: Run ${{ matrix.target }}
run: |
@ -55,6 +55,6 @@ jobs:
TESTFLAGS: -coverprofile=/tmp/coverage/coverage.txt
-
name: Send to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
file: ./build/coverage/coverage.txt

View File

@ -12,22 +12,22 @@ on:
jobs:
ctn:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
-
name: Test
uses: docker/bake-action@v1
uses: docker/bake-action@v2
with:
targets: test-coverage
-
name: Send to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
file: ./build/coverage/coverage.txt
@ -41,8 +41,8 @@ jobs:
fail-fast: false
matrix:
os:
- macos-latest
# - windows-latest # FIXME: some tests are failing on the Windows runner, as well as on Appveyor since June 24, 2018: https://ci.appveyor.com/project/docker/cli/history
- macos-11
# - windows-2022 # FIXME: some tests are failing on the Windows runner, as well as on Appveyor since June 24, 2018: https://ci.appveyor.com/project/docker/cli/history
steps:
-
name: Prepare git
@ -52,12 +52,12 @@ jobs:
git config --system core.eol lf
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: ${{ env.GOPATH }}/src/github.com/docker/cli
-
name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.18.5
-
@ -69,7 +69,7 @@ jobs:
shell: bash
-
name: Send to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
file: /tmp/coverage.txt
working-directory: ${{ env.GOPATH }}/src/github.com/docker/cli

View File

@ -12,7 +12,7 @@ on:
jobs:
validate:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
@ -24,17 +24,17 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Run
uses: docker/bake-action@v1
uses: docker/bake-action@v2
with:
targets: ${{ matrix.target }}
validate-make:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
@ -44,7 +44,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
-