Skip to content

Commit

Permalink
Update workflow files to install Go via composite action
Browse files Browse the repository at this point in the history
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
(cherry picked from commit 2820343)
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
  • Loading branch information
mxpv authored and akhilerm committed Mar 1, 2024
1 parent a5c0d06 commit 6379dd6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 27 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build-test-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,12 @@ jobs:
working-directory: src/github.com/containerd/containerd

steps:
- uses: actions/setup-go@v5
with:
go-version: "1.20.13"

- uses: actions/checkout@v4
with:
path: src/github.com/containerd/containerd

- uses: ./src/github.com/containerd/containerd/.github/actions/install-go

- name: Set env
shell: bash
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: 1.20.13
- uses: ./.github/actions/install-go

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/setup-go@v5
with:
# FIXME: go-fuzz fails with Go 1.20: `cgo_unix_cgo_res.cgo2.c:(.text+0x32): undefined reference to `__res_search'`
# https://github.com/containerd/containerd/pull/8103#issuecomment-1429256152
go-version: 1.18
- uses: actions/checkout@v4
- uses: ./.github/actions/install-go
- run: script/go-test-fuzz.sh
6 changes: 2 additions & 4 deletions .github/workflows/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ jobs:
working-directory: src/github.com/containerd/containerd

steps:
- uses: actions/setup-go@v5
with:
go-version: "1.20.13"

- uses: actions/checkout@v4
with:
path: src/github.com/containerd/containerd

- uses: ./src/github.com/containerd/containerd/.github/actions/install-go

- name: Set env
shell: bash
run: |
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
paths:
- ".github/workflows/nightly.yml"

env:
GO_VERSION: "1.20.13"

permissions: # added using https://github.com/step-security/secure-workflows
contents: read

Expand All @@ -23,14 +20,12 @@ jobs:
working-directory: src/github.com/containerd/containerd

steps:
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/checkout@v4
with:
path: src/github.com/containerd/containerd

- uses: ./src/github.com/containerd/containerd/.github/actions/install-go

- name: Set env
shell: bash
run: |
Expand Down Expand Up @@ -143,14 +138,12 @@ jobs:
working-directory: src/github.com/containerd/containerd

steps:
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/checkout@v4
with:
path: src/github.com/containerd/containerd

- uses: ./src/github.com/containerd/containerd/.github/actions/install-go

- name: Set env
shell: bash
run: |
Expand Down

0 comments on commit 6379dd6

Please sign in to comment.