Skip to content

Commit

Permalink
Added Docker metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
4l3j0Ok committed Nov 29, 2023
1 parent 29c3400 commit daef04f
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,39 @@ on:
push:
branches:
- main
tags:
- 'v*'
jobs:
build:
environment: prod
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Docker login
-
uses: actions/checkout@master
-
name: Docker login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push to Docker Hub
-
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: alejoide/bcra-scraper-api:latest
tags: ${{ steps.meta.outputs.tags }}
push: true

0 comments on commit daef04f

Please sign in to comment.