Skip to content

Commit

Permalink
MPT-5777 add workflow to release to ACR
Browse files Browse the repository at this point in the history
  • Loading branch information
ffaraone committed Dec 30, 2024
1 parent 8bdbe3c commit 47d6967
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release

on:
release:
types: [published]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 'Get the version'
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT"

- name: 'Login to ACR'
uses: docker/login-action@v3
with:
registry: ${{ vars.REGISTRY_LOGIN_SERVER }}
username: ${{ vars.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ vars.REGISTRY_LOGIN_SERVER }}/ffc-operations
tags: |
type=semver,pattern={{major}}.{{minor}}.{{patch}},value=${{ steps.get_version.outputs.VERSION }}
type=semver,pattern={{major}}.{{minor}},value=${{ steps.get_version.outputs.VERSION }}
type=semver,pattern={{major}},value=${{ steps.get_version.outputs.VERSION }}
flavor: |
latest=false
- name: Build and push docker image
id: docker_build
uses: docker/build-push-action@v3
with:
file: prod.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
- name: Docker image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit 47d6967

Please sign in to comment.