mirror of
https://github.com/farcasclaudiu/LearnCollectInst.git
synced 2026-06-22 09:01:11 +03:00
26 lines
646 B
YAML
26 lines
646 B
YAML
name: Docker Image CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_GITHUB_TOKEN }}
|
|
- uses: actions/checkout@v3
|
|
- name: Build the Docker image
|
|
run: docker build . --file ./LearnCollectInst.Api/Dockerfile --tag ${{ secrets.DOCKER_USERNAME }}/learncollectinst.api:$(date +%s)
|
|
- name: Docker Hub push
|
|
run: docker push ${{ secrets.DOCKER_USERNAME }}/learncollectinst.api
|