Skip to content

Merge pull request #39 from digitalocean/sachinsingh/DELI-6498-fix-ku… #7

Merge pull request #39 from digitalocean/sachinsingh/DELI-6498-fix-ku…

Merge pull request #39 from digitalocean/sachinsingh/DELI-6498-fix-ku… #7

# Copyright 2022 DigitalOcean
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Build and push envtest image
# Run when a PR that makes an edit to test directory or the Makefile is merged with master
on:
push:
branches:
- main
paths:
- "test/**"
- "Makefile"
jobs:
build_image:
name: Build and release image
strategy:
matrix:
platform: [ubuntu-20.04]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout current branch
uses: actions/[email protected]
- name: Log in to the Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build and release image
run : |
make envtest-image
docker push $(docker images --format {{.Repository}}:{{.Tag}} | head -n1)