Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
Merge branch 'smk-cdci' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
franTarkenton committed Nov 27, 2020
2 parents 1124e60 + 472ea2c commit 7799a6e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
env:
OPENSHIFT_SERVER_URL: ${{secrets.OPENSHIFT_SERVER_URL}}
OPENSHIFT_TOKEN_DEV: ${{secrets.OPENSHIFT_TOKEN_DEV}}
GHCR_USER: ${{ secrets.GHCR_USER }}
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
outputs:
dockerversiontag: ${{ steps.calculateImageTag.outputs.DOCKER_VERSION_TAG }}

Expand Down Expand Up @@ -120,8 +122,10 @@ jobs:
buildkitd-flags: --debug

# --------- required by build-push-action
# - explicitly setting the GHCR_USER and TOKEN to help with transition to GHCR.IO
- name: Login to GitHub Packages Docker Registry
uses: docker/login-action@v1
if: env.GHCR_USER != null && env.GHCR_TOKEN != null
with:
registry: docker.pkg.github.com
username: ${{ secrets.GHCR_USER }}
Expand All @@ -131,6 +135,7 @@ jobs:
# Push disabled because not working with this action atm
- name: Build and push
id: docker_build
if: env.GHCR_USER != null && env.GHCR_TOKEN != null
uses: docker/build-push-action@v2
with:
context: .
Expand All @@ -141,15 +146,19 @@ jobs:

# --------- Push image to remote
- name: Push to Github Packages
if: env.GHCR_USER != null && env.GHCR_TOKEN != null
run: |
echo pushing the image
# ---- commented out until pipeline goes to prod.
docker push ${{ steps.calculateImageTag.outputs.DOCKER_VERSION_TAG }}
# -------- Update the issue --------
# only update if:
# event type is pr
# secrets for github user / token populated
- name: Tag the pull request with build tag
id: tagpullrequest
if: env.GITHUB_EVENT_NAME == pull_request
if: env.GITHUB_EVENT_NAME == pull_request && env.GHCR_USER != null && env.GHCR_TOKEN != null
run: |
DOCKER_VERSION_TAG=${{ steps.calculateImageTag.outputs.TIMESTAMPTAG }}
Expand Down

0 comments on commit 7799a6e

Please sign in to comment.