Skip to content

Commit

Permalink
Fix release build-args, add act exclusions for testing purposes (k8ss…
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm authored Feb 25, 2022
1 parent 87498a1 commit 4ce4301
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,36 @@ jobs:
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
if: ${{ !env.ACT }}
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Set git parsed values
if: ${{ !env.ACT }}
id: vars
shell: bash
run: |
echo ::set-output name=sha_short::$(git rev-parse --short=8 ${{ github.sha }})
echo ::set-output name=tag_name::${GITHUB_REF#refs/tags/}
echo "TARGET_VERSION=$(echo ${GITHUB_REF#refs/tags/} | awk '{print substr($0,2)}')" >> $GITHUB_ENV
- name: Set git parsed values for act
if: ${{ env.ACT }}
id: vars
shell: bash
run: |
echo ::set-output name=sha_short::$(git rev-parse --short=8 ${{ github.sha }})
echo ::set-output name=tag_name::$(git describe --abbrev=0 --tags)
echo "TARGET_VERSION=$(echo $(git describe --abbrev=0 --tags) | awk '{print substr($0,2)}')" >> $GITHUB_ENV
- name: Build and push
id: docker_build_system-logger
uses: docker/build-push-action@v2
with:
file: logger.Dockerfile
build-args: |
VERSION=${{ env.TARGET_VERSION }}
context: .
push: true
push: ${{ !env.ACT }}
tags: k8ssandra/system-logger:${{ steps.vars.outputs.tag_name}}
platforms: linux/amd64
cache-from: type=local,src=/tmp/.buildx-cache
Expand All @@ -55,12 +67,15 @@ jobs:
uses: docker/build-push-action@v2
with:
file: Dockerfile
build-args: |
VERSION=${{ env.TARGET_VERSION }}
context: .
push: true
push: ${{ !env.ACT }}
tags: k8ssandra/cass-operator:${{ steps.vars.outputs.tag_name}}
platforms: linux/amd64
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Create bundle and catalog files
if: ${{ !env.ACT }}
run: |
make IMG=k8ssandra/cass-operator:${{ steps.vars.outputs.tag_name}} VERSION=${{ env.TARGET_VERSION }} bundle bundle-build bundle-push catalog-build catalog-push

0 comments on commit 4ce4301

Please sign in to comment.