Streamline hcs shim release flow

Improvements to acquire/build hcsshim from source in the release
workflow.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
This commit is contained in:
Phil Estes 2020-06-04 12:23:50 -04:00
parent 8f959d569a
commit 8fcd5a1f28
No known key found for this signature in database
GPG Key ID: 0F386284C03A1162

View File

@ -73,32 +73,29 @@ jobs:
echo "::set-env name=GOPATH::${{ github.workspace }}" echo "::set-env name=GOPATH::${{ github.workspace }}"
echo "::add-path::${{ github.workspace }}/bin" echo "::add-path::${{ github.workspace }}/bin"
- name: Checkout - name: Checkout containerd
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: containerd/containerd repository: containerd/containerd
ref: ${{ github.ref }} ref: ${{ github.ref }}
path: src/github.com/containerd/containerd path: src/github.com/containerd/containerd
- name: Checkout Microsoft/hcsshim
if: startsWith(matrix.os, 'windows')
uses: actions/checkout@v2
with:
repository: Microsoft/hcsshim
path: src/github.com/Microsoft/hcsshim
- name: Install Linux dependencies - name: Install Linux dependencies
if: startsWith(matrix.os, 'ubuntu') if: startsWith(matrix.os, 'ubuntu')
run: | run: |
sudo apt-get install -y btrfs-tools libseccomp-dev sudo apt-get install -y btrfs-tools libseccomp-dev
- name: Prepare hcsshim source - name: HCS Shim commit
id: hcsshim_commit
if: startsWith(matrix.os, 'windows') if: startsWith(matrix.os, 'windows')
shell: bash shell: bash
run: echo "::set-output name=sha::$(grep Microsoft/hcsshim vendor.conf | awk '{print $2}')"
working-directory: src/github.com/containerd/containerd working-directory: src/github.com/containerd/containerd
run: | - name: Checkout hcsshim source
SHIM_COMMIT=$(grep Microsoft/hcsshim vendor.conf | awk '{print $2}') if: startsWith(matrix.os, 'windows')
cd ../../Microsoft/hcsshim uses: actions/checkout@v2
git fetch --tags origin "${SHIM_COMMIT}" with:
git checkout "${SHIM_COMMIT}" repository: Microsoft/hcsshim
ref: ${{ steps.hcsshim_commit.outputs.sha }}
path: src/github.com/Microsoft/hcsshim
- name: Make - name: Make
shell: bash shell: bash
env: env: