Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 14s
32 lines
868 B
YAML
32 lines
868 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
- name: List repository files
|
|
run: |
|
|
ls ${{ gitea.workspace }}
|
|
- name: Build the Docker Image
|
|
run: |
|
|
cd ${{ gitea.workspace }} && docker build -t sprout-db-migrations:latest -f Dockerfile .
|
|
|
|
- name: Log in to Docker Hub - Main web app container registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- name: Build and push Main web app container image to registry
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
push: true
|
|
tags: latest
|
|
file: ./Dockerfile
|