Skip to content

Commit

Permalink
Merge pull request clearlydefined#107 from clearlydefined/elr/workflow
Browse files Browse the repository at this point in the history
set value to return as docker-image-name-with-tag
  • Loading branch information
elrayle authored Oct 29, 2024
2 parents c10f84f + f675f17 commit d758867
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/app-build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
uses: actions/[email protected]
with:
repository: 'clearlydefined/operations'
ref: 'v3.1.1'
ref: 'v3.1.2'
path: 'operations'
- name: Get version from package-lock.json
id: get_version
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/app-build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ on:

outputs:
docker-image-name-with-tag:
value: ${{ jobs.determine-image-name.outputs.docker-image-name-with-tag }}
value: ${{ jobs.build-image-names.outputs.docker-image-to-use }}

jobs:
check-deployable:
Expand All @@ -55,12 +55,13 @@ jobs:
runs-on: ubuntu-latest
outputs:
names-with-tags: ${{ env.DOCKER_IMAGE_TAGS }}
docker-image-to-use: ${{ env.DOCKER_IMAGE_TO_USE }}
steps:
- name: Checkout this repo
uses: actions/[email protected]
with:
repository: 'clearlydefined/operations'
ref: 'v3.1.1'
ref: 'v3.1.2'
path: 'operations'
- name: Determine Image Name
id: determine-image-name
Expand All @@ -76,13 +77,17 @@ jobs:
- name: Add ghcr.io
id: add-ghcr
run: |
echo "DOCKER_IMAGE_TAGS=ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}" >> $GITHUB_ENV
ghcr_image_tags="ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}"
echo "DOCKER_IMAGE_TAGS=$ghcr_image_tags" >> $GITHUB_ENV
echo "DOCKER_IMAGE_TO_USE=$ghcr_image_tags" >> $GITHUB_ENV
- name: add-dockerhub
if: ${{ inputs.docker-hub-username != '' }}
id: add-dockerhub
run: |
echo "DOCKER_IMAGE_TAGS=${{ env.DOCKER_IMAGE_TAGS }},${{ inputs.docker-hub-username }}/${{ env.IMAGE_NAME }}" >> $GITHUB_ENV
docker_image_tags="${{ inputs.docker-hub-username }}/${{ env.IMAGE_NAME }}"
echo "DOCKER_IMAGE_TAGS=${{ env.DOCKER_IMAGE_TAGS }}, $docker_image_tags" >> $GITHUB_ENV
# use Docker Hub image if it is created by overwriting DOCKER_IMAGE_TO_USE
echo "DOCKER_IMAGE_TO_USE=$docker_image_tags" >> $GITHUB_ENV
build-docker-image:
name: Build Image
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/app-is-deployable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/[email protected]
with:
repository: 'clearlydefined/operations'
ref: 'v3.1.1'
ref: 'v3.1.2'
path: 'operations'
- id: confirm-dev
shell: bash
Expand All @@ -47,7 +47,7 @@ jobs:
uses: actions/[email protected]
with:
repository: 'clearlydefined/operations'
ref: 'v3.1.1'
ref: 'v3.1.2'
path: 'operations'

- name: Get organization ID
Expand Down

0 comments on commit d758867

Please sign in to comment.