Skip to content

Merge pull request #46 from freddycoder/snyk-fix-a08427809a1a70772dc9… #93

Merge pull request #46 from freddycoder/snyk-fix-a08427809a1a70772dc9…

Merge pull request #46 from freddycoder/snyk-fix-a08427809a1a70772dc9… #93

name: AzureDevOpsTeamMembersVelocity-Image
on:
push:
paths:
- 'AzureDevOpsTeamMembersVelocity/**'
- 'IntegrationTest/**'
- 'UnitTest/**'
branches:
- main
pull_request:
paths:
- 'AzureDevOpsTeamMembersVelocity/**'
- 'IntegrationTest/**'
- 'UnitTest/**'
types: [opened, synchronize, reopened]
env:
REGISTRY_NAME: erabliereapi
IMAGE_NAME: azuredevopsteammembersvelocity
IMAGE_TAG: latest
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Login into acr
- name: Login into ACR
run: echo ${{ secrets.registryPassword }} | docker login -u ${{ secrets.registryUsername }} --password-stdin
# Build the image
- name: Docker build
run: docker build -t $IMAGE_NAME:$IMAGE_TAG .
# Tag the images
- name: Docker tag
if: ${{ github.ref == 'refs/heads/main' }}
run: docker tag $IMAGE_NAME:$IMAGE_TAG $REGISTRY_NAME/$IMAGE_NAME:$IMAGE_TAG
# Push the image
- name: Docker push
if: ${{ github.ref == 'refs/heads/main' }}
run: docker push $REGISTRY_NAME/$IMAGE_NAME:$IMAGE_TAG