-
Notifications
You must be signed in to change notification settings - Fork 5
34 lines (30 loc) · 935 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Build Back-end API
on:
workflow_dispatch:
inputs:
refToBuild:
description: 'Branch, tag or commit SHA1 to build'
required: true
type: string
push:
branches: [ "main" ]
paths:
- 'apps/medicamentar-api/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{secrets.DOCKERHUB_USER}}
password: ${{secrets.DOCKERHUB_PWD}}
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: apps/medicamentar-api
file: apps/medicamentar-api/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USER }}/medicamentar-api:latest, ${{ secrets.DOCKERHUB_USER }}/medicamentar-api:${{ github.sha }}