Skip to content

build api testing

build api testing #88

name: build api testing
on:
workflow_dispatch:
env:
IMAGE_NAME: arthistlmu/artigo_api
jobs:
build-and-push-image:
runs-on: ubuntu-latest
environment: build
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.0.0
with:
images: ${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v5.0.0
with:
context: .
file: ./api/Dockerfile
build-args: |
VUE_APP_API=${{ secrets.VUE_APP_API }}
VUE_APP_FRONTEND=${{ secrets.VUE_APP_FRONTEND }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}