-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (27 loc) · 1.14 KB
/
build-and-publish-docker-image.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
name: Publish KanbanCord Docker Image
on:
release:
types: [published]
workflow_dispatch:
jobs:
test_project:
name: Build Project
uses: j4asper/KanbanCord/.github/workflows/unit-tests.yml@main
build_and_publish_bot_docker_image:
name: Build and Publish Bot Docker Image
runs-on: ubuntu-latest
needs: test_project
steps:
- uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker image
run: docker build -f ./Dockerfile --build-arg application_version=${{ github.ref_name }} -t ${{ secrets.DOCKER_USERNAME }}/kanbancord:${{ github.ref_name }} .
# - name: Push to Registry
# run: |
# docker push ${{ secrets.DOCKER_USERNAME }}/kanbancord:${{ github.ref_name }}
# docker tag ${{ secrets.DOCKER_USERNAME }}/kanbancord:${{ github.ref_name }} ${{ secrets.DOCKER_USERNAME }}/kanbancord:latest
# docker push ${{ secrets.DOCKER_USERNAME }}/kanbancord:latest