Skip to content

Build Docker Container #32

Build Docker Container

Build Docker Container #32

Workflow file for this run

name: docker
run-name: Build Docker Container
on:
push:
branches:
- main
paths:
- "src/**"
pull_request:
branches:
- main
paths:
- "src/**"
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.10.2
with:
versionSpec: "5.x"
- name: Run GitVersion
uses: gittools/actions/gitversion/execute@v0.10.2
with:
useConfigFile: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push (PR)
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name == 'pull_request' }}
tags: |
dickwolff/export-to-ghostfolio:${{ env.GitVersion_MajorMinorPatch }}-beta
- name: Build and push (main)
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name != 'pull_request' }}
tags: |
dickwolff/export-to-ghostfolio:latest
dickwolff/export-to-ghostfolio:${{ env.GitVersion_MajorMinorPatch }}