Skip to content

Check for main branch #19

Check for main branch

Check for main branch #19

Workflow file for this run

name: ci
on:
push:
branches:
- 'feature/Dockerize-With-File-Watch'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- name: Run GitVersion
uses: gittools/actions/gitversion/[email protected]
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: Set GitVersion tag if main mranch
if: ${{ github.ref == 'refs/heads/main' }}
run: |
echo "DOCKER_TAG=dickwolff/export-to-ghostfolio:${{ env.GitVersion_MajorMinorPatch }}" >> $GITHUB_ENV
- name: Set GitVersion tag if feature branch
if: ${{ github.ref != 'refs/heads/main' }}
run: |
echo "DOCKER_TAG=dickwolff/export-to-ghostfolio:${{ env.GitVersion_MajorMinorPatch }}-beta" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
env:
GITVERSION_TAG: ${{ github.event_name != 'pull_request' }}
with:
push: ${{ github.event_name != 'pull_request' }}
tags: |
dickwolff/export-to-ghostfolio:latest
${{ env.DOCKER_TAG }}