test #39
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: docker | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'v*' | ||
- 'private/**' | ||
jobs: | ||
buildx: | ||
env: | ||
USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
BUILD_ARGS: "" | ||
PLATFORMS: linux/amd64 | ||
TAG: ${{ github.head_ref || github.ref_name }} | ||
TESTTEAG: ${{ env.TAG//\/ }} | ||
Check failure on line 18 in .github/workflows/ovs-multiarch-build-and-push.yml GitHub Actions / dockerInvalid workflow file
|
||
PUSH: true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set TAG | ||
run: | | ||
TAG=${{ env.TAG }} | ||
if [[ $? -ne 0 ]] | ||
then | ||
TAG=${TAG//\/} | ||
echo "in if block" | ||
#$TAG | sed 's/[^a-zA-Z0-9_.]/-/g' | ||
else | ||
TAG=${TAG//\/} | ||
#TAG=$(echo $TAG | sed 's/-.*//')-pmk | ||
fi | ||
echo $TAG | ||
- uses: actions/checkout@v3 | ||
- name: Setup Docker BuildX | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
# setup Docker buld action | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to the Docker Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ env.USERNAME }} | ||
password: ${{ env.PASSWORD }} | ||
- name: Build/Push image to Docker Container Registry | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: hostplumber/pkg/ovs-docker | ||
tags: docker.io/platform9/openvswitch:${TAG} | ||
push: ${{ env.PUSH }} | ||
build-args: ${{ env.BUILD_ARGS}} | ||
platforms: ${{ env.PLATFORMS }} |