Build and push tests images #8
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: Build and push tests images | |
on: | |
workflow_dispatch: | |
jobs: | |
build_push: | |
runs-on: ubuntu-latest | |
env: | |
REGISTRY: quay.io | |
REGISTRY_TAG: ${{ github.head_ref || github.ref_name }} | |
REGISTRY_ORG: kubev2v | |
USE_BAZEL_VERSION: 5.4.0 | |
steps: | |
- name: Check out forkliftci repository | |
uses: actions/checkout@v3 | |
- name: Add cwd to path for kubectl. | |
run: echo `pwd` >> $GITHUB_PATH | |
- name: Checkout forklift | |
uses: actions/checkout@v3 | |
with: | |
repository: kubev2v/forklift | |
path: forklift | |
- name: Login to quay.io with bot account | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_TOKEN }} | |
- name: Bazel cache | |
id: bazel-cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/bazel | |
key: ${{ runner.os }}-bazel-cache-${{ hashFiles('WORKSPACE') }} | |
#- run: cd forklift/ && bazel sync --configure | |
# this is required by nbdkit plugin compiler | |
- run: sudo apt-get install -y nbdkit-plugin-dev | |
- name: Build and push images to quay.io | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
./build_tests_bazel.sh |