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

View File

@ -1,16 +1,6 @@
# For most projects, this workflow file will not need changing; you simply need name: codeql
# 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"
on: on:
# push:
# branches: [master]
# pull_request:
# # The branches below must be a subset of the branches above
# branches: [master]
schedule: schedule:
# ┌───────────── minute (0 - 59) # ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23) # │ ┌───────────── hour (0 - 23)
@ -24,57 +14,27 @@ on:
- cron: '0 9 * * 4' - cron: '0 9 * * 4'
jobs: jobs:
analyze: codeql:
name: Analyze runs-on: ubuntu-20.04
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
steps: steps:
- name: Checkout repository -
uses: actions/checkout@v2 name: Checkout
uses: actions/checkout@v3
with: 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 fetch-depth: 2
-
# If this run was triggered by a pull request event, then checkout name: Checkout HEAD on PR
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }} if: ${{ github.event_name == 'pull_request' }}
run: |
# Initializes the CodeQL tools for scanning. git checkout HEAD^2
- name: Initialize CodeQL -
uses: github/codeql-action/init@v1 name: Initialize CodeQL
uses: github/codeql-action/init@v2
with: with:
languages: ${{ matrix.language }} languages: go
# 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. name: Autobuild
# Prefix the list here with "+" to use these queries and those in the config file. uses: github/codeql-action/autobuild@v2
# queries: ./path/to/local/query, your-org/your-repo/queries@main -
name: Perform CodeQL Analysis
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). uses: github/codeql-action/analyze@v2
# 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

View File

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

View File

@ -12,22 +12,22 @@ on:
jobs: jobs:
ctn: ctn:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v2
- -
name: Test name: Test
uses: docker/bake-action@v1 uses: docker/bake-action@v2
with: with:
targets: test-coverage targets: test-coverage
- -
name: Send to Codecov name: Send to Codecov
uses: codecov/codecov-action@v2 uses: codecov/codecov-action@v3
with: with:
file: ./build/coverage/coverage.txt file: ./build/coverage/coverage.txt
@ -41,8 +41,8 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
os: os:
- macos-latest - macos-11
# - 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 # - 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: steps:
- -
name: Prepare git name: Prepare git
@ -52,12 +52,12 @@ jobs:
git config --system core.eol lf git config --system core.eol lf
- -
name: Checkout name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
path: ${{ env.GOPATH }}/src/github.com/docker/cli path: ${{ env.GOPATH }}/src/github.com/docker/cli
- -
name: Set up Go name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v3
with: with:
go-version: 1.18.5 go-version: 1.18.5
- -
@ -69,7 +69,7 @@ jobs:
shell: bash shell: bash
- -
name: Send to Codecov name: Send to Codecov
uses: codecov/codecov-action@v2 uses: codecov/codecov-action@v3
with: with:
file: /tmp/coverage.txt file: /tmp/coverage.txt
working-directory: ${{ env.GOPATH }}/src/github.com/docker/cli working-directory: ${{ env.GOPATH }}/src/github.com/docker/cli

View File

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