Skip to content

Merge pull request #3 from UST-DeMAF/ES-67-76 #17

Merge pull request #3 from UST-DeMAF/ES-67-76

Merge pull request #3 from UST-DeMAF/ES-67-76 #17

name: buildAndPushImage
on:
push:
branches:
- 'main'
- 'dev'
pull_request:
branches:
- 'main'
env:
IMAGE_URL: ghcr.io/ust-demaf
IMAGE_NAME: analysis-manager
IMAGE_TAG: ${{ github.ref == 'refs/heads/main' && 'latest' || 'testing' }}
jobs:
build-with-paketo-push-2-ghcr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u well5a --password-stdin
- name: Build the Docker image
run: docker build . --file Dockerfile --tag $IMAGE_URL/$IMAGE_NAME:$IMAGE_TAG
- name: Push the Docker image
run: docker push $IMAGE_URL/$IMAGE_NAME:$IMAGE_TAG