Skip to content

Merge pull request #16 from miguelcarcamov/development #1

Merge pull request #16 from miguelcarcamov/development

Merge pull request #16 from miguelcarcamov/development #1

name: build-tagged-container
on:
push:
tags:
- '*'
env:
REGISTRY: ghcr.io
jobs:
build-tagged-container:
runs-on: ubuntu-latest
steps:
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
# Optionally strip `v` prefix
strip_v: true
- name: Checkout Code
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
file: ./Dockerfile.prod
push: true # Will only build if this is not here
tags: ${{ env.REGISTRY }}/${{ github.repository }}:${{steps.tag.outputs.tag}}
secrets: |
"BRANCH_NAME=${{ github.head_ref || github.ref_name }}"