Fix build-push-images.sh test #77
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: Cass Config Builder Build & Deploy | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build_operator_docker: | |
name: Build Cass Config Builder Docker Image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
if: github.event_name == 'pull_request' | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
submodules: true | |
- uses: actions/checkout@v3 | |
if: github.event_name != 'pull_request' | |
with: | |
submodules: true | |
- name: Login to GitHub Package Registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u "${{ github.actor }}" --password-stdin | |
- name: Setup Buildx | |
id: buildx | |
uses: crazy-max/ghaction-docker-buildx@v3 | |
- name: Cache Docker layers | |
uses: actions/cache@v3 | |
id: cache | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
java-version: 1.8 | |
- name: Run tests | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'datastax/cass-config-builder' | |
env: | |
ORG_GRADLE_PROJECT_dockerRegistry: docker.pkg.github.com | |
ORG_GRADLE_PROJECT_dockerRegistryUsername: ${{ github.actor }} | |
ORG_GRADLE_PROJECT_dockerRegistryPassword: ${{ secrets.GITHUB_TOKEN }} | |
uses: eskatos/gradle-command-action@v1 | |
with: | |
gradle-version: 6.0.1 | |
arguments: test | |
- name: Build docker image | |
env: | |
GITHUB_REPO_OWNER: ${{ github.repository_owner }} | |
run: | | |
export GITHUB_REPO_URL="https://github.com/${{ github.repository }}" | |
./scripts/build-push-images.sh |