Skip to content

Commit

Permalink
Refactor: Combine docker-push-*.yml files
Browse files Browse the repository at this point in the history
Deleted `docker-push-uat-image.yml` and moved its logic to `docker-push-image.yml`. This maintains all of the same functionality that existed between the two files and better aligns with DRY principles.
  • Loading branch information
aaronskiba committed Dec 20, 2024
1 parent 7dc2006 commit ab1df44
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 42 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/docker-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ name: Publish Docker image
on:
release:
types: [published]
push:
tags:
- '*-uat-*'

jobs:
push_to_registry:
Expand All @@ -28,9 +31,16 @@ jobs:
uses: docker/metadata-action@v3
with:
images: ualbertalib/dmp_roadmap
# GitHub tag matching and Docker tag generation are contingent on the event type
# (The event type is either 'release' or 'push' of a '*-uat-*' tag)
tags: |
${{ github.event_name == 'release' && '
type=match,pattern=.+portage-(\d\.\d\.\d),group=1
type=raw,value=production
' || '
type=match,pattern=.+portage-(\d+\.\d+\.\d+-uat-\d+),group=1
type=raw,value=uat
' }}
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/docker-push-uat-image.yml

This file was deleted.

0 comments on commit ab1df44

Please sign in to comment.