Skip to content

update logic to check for changes #5

update logic to check for changes

update logic to check for changes #5

name: Build and Push Docker Images
on:
push:
branches: [develop, 'GEN*', 'gen*']
paths:
- 'scripts/references/**'
- '.github/workflows/build-docker-images.yml'
jobs:
build_references_docker:
if: ${{ contains(github.event.commits.*.modified || github.event.commits.*.added || github.event.commits.*.removed, 'scripts/references/') }}
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-references
TAG: ${{ github.ref_name }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image for References
run: |
docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} -f scripts/references/Dockerfile .
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}