Skip to content

Context

Context #2

Workflow file for this run

name: deploy
on:
push:
branches:
- release
- main
jobs:
build:
environment: production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
docker build -t ${{ github.repository }}:latest --file Docker/Dockerfile .
- name: Login Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ github.repository }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:Docker"
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}