Skip to content

Commit

Permalink
Checkout appropriate containerd ref
Browse files Browse the repository at this point in the history
Signed-off-by: Kirtana Ashok <[email protected]>
  • Loading branch information
kiashok committed Sep 20, 2023
1 parent 623db83 commit d10bd0b
Showing 1 changed file with 37 additions and 4 deletions.
41 changes: 37 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,36 @@ jobs:
- uses: actions/checkout@v3
with:
path: "go/src/github.com/Microsoft/hcsshim"
name: Checkout hcsshim

- name: Get containerd ref
shell: powershell
run: |
$v = go list -m -f '{{ .Version }}' 'github.com/containerd/containerd' 2>&1
if ( $LASTEXITCODE ) {
Write-Output '::error::Could not retrieve containerd version.'
exit $LASTEXITCODE
}
Write-Output "containerd ref is: $v"
"containerd_ref=$v" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
working-directory: go/src/github.com/Microsoft/hcsshim

# Install protoc-gen-gogoctrd in D:\bin
- uses: actions/checkout@v3
with:
repository: containerd/containerd
ref: v1.6.2
path: "containerd"
ref: "${{ env.containerd_ref }}"
name: Checkout containerd

- name: Install protoc-gen-gogoctrd
shell: powershell
run: |
cd containerd
go build ./cmd/protoc-gen-gogoctrd
mkdir D:\bin
mv protoc-gen-gogoctrd.exe D:\bin
# Install protoc in D:\bin
- name: Install protoc
shell: powershell
Expand All @@ -77,6 +94,7 @@ jobs:
Expand-Archive -Path protoc.zip -DestinationPath .
mv include go/src/github.com/Microsoft/hcsshim/protobuf
mv bin\protoc.exe D:\bin
- name: Run Protobuild
shell: powershell
run: |
Expand Down Expand Up @@ -260,12 +278,27 @@ jobs:
- uses: actions/checkout@v3
with:
path: src/github.com/containerd/containerd
repository: "containerd/containerd"
path: src/github.com/Microsoft/hcsshim
name: Checkout hcsshim

- name: Get containerd ref
shell: powershell
run: |
$v = go list -m -f '{{ .Version }}' 'github.com/containerd/containerd' 2>&1
if ( $LASTEXITCODE ) {
Write-Output '::error::Could not retrieve containerd version.'
exit $LASTEXITCODE
}
Write-Output "containerd ref is: $v"
"containerd_ref=$v" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
working-directory: src/github.com/Microsoft/hcsshim

- uses: actions/checkout@v3
with:
path: src/github.com/Microsoft/hcsshim
path: src/github.com/containerd/containerd
repository: "containerd/containerd"
ref: "${{ env.containerd_ref }}"
name: Checkout containerd

- name: Install crictl
shell: powershell
Expand Down

0 comments on commit d10bd0b

Please sign in to comment.