Use ocp token instead of password #57
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: Build & Push | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
if: github.event_name == 'pull_request' | |
uses: styfle/[email protected] | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt-openj9' | |
java-version: '17' | |
- name: Login to quay | |
env: | |
CONTAINER_USER: ${{ secrets.QUAY_USER }} | |
CONTAINER_PASSWORD: ${{ secrets.QUAY_PASSWORD }} | |
CONTAINER_REGISTRY: quay.io | |
run: | |
echo "$CONTAINER_PASSWORD" | docker login $CONTAINER_REGISTRY --username $CONTAINER_USER --password-stdin | |
- name: Build images | |
run: | | |
make java_build | |
make docker_build | |
- name: Tag & Push | |
env: | |
USER: tealc | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: | | |
make docker_push |