[ISSUE-1195] Calico in kind tests #1173
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: devkit | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
LATEST_TAG: latest | |
REGISTRY: ghcr.io/${{ github.repository }} | |
equeal_with_latest: true | |
docker_version: "1.16.8" | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set env variables | |
working-directory: devkit | |
run: | | |
image_name=`make repo` | |
image_tag=`make version` | |
echo "LOCAL_IMAGE=$image_name:$image_tag" >> $GITHUB_ENV | |
echo "DEST_IMAGE=${{ env.REGISTRY }}/$image_name:$image_tag" >> $GITHUB_ENV | |
echo "LATEST_IMAGE=${{ env.REGISTRY }}/$image_name:${{ env.LATEST_TAG }}" >> $GITHUB_ENV | |
- name: Log in to GitHub Docker Registry | |
uses: docker/[email protected] | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Pull latest csi-baremetal-devkit | |
run: docker pull ${{ env.LATEST_IMAGE }} || true | |
- name: Build devkit image | |
working-directory: devkit | |
run: make build CACHE_IMAGE=${{ env.LATEST_IMAGE }} | |
- name: Check equeal with latest | |
continue-on-error: true | |
working-directory: devkit | |
run: | | |
id1=`docker inspect --format="{{.Id}}" ${{ env.LOCAL_IMAGE }}` | |
id2=`docker inspect --format="{{.Id}}" ${{ env.LATEST_IMAGE }}` | |
equeal_with_latest="false" | |
[ ${id1} == ${id2} ] && equeal_with_latest="true" | |
echo "equeal_with_latest=${equeal_with_latest}" >> $GITHUB_ENV |