Skip to content

Added Docker metadata #12

Added Docker metadata

Added Docker metadata #12

Workflow file for this run

name: build
on:
push:
branches:
- main
tags:
- 'v*'
jobs:
build:
environment: prod
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@master
-
name: Docker login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
images: |
alejoide/bcra-scraper-api
-
name: Build and push to Docker Hub
uses: docker/build-push-action@v5
with:
context: ./backend
tag_with_ref: true
tag_with_sha: true
tags: ${{ steps.meta.outputs.tags }}
push: true