Skip to content

Fixed version number 1.5.0.3 #89

Fixed version number 1.5.0.3

Fixed version number 1.5.0.3 #89

Workflow file for this run

name: Docker Image CI
#on: [ push ]
on:
push:
paths-ignore:
- '*.md'
- '.github/**'
- '*.yaml'
- '*.png'
- 'LICENSE'
jobs:
build_arm64_images:
#if: startsWith(github.ref, 'refs/tags/v')
#if: github.event.pull_request.merged == true
name: "Build Multi Arch Images"
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
- name: Get version informations
id: infos
run: |
versionGit=${{ steps.get-latest-tag.outputs.tag }}
versionProject=v$(grep '<Version>' 'iGotify Notification Assist.csproj' | cut -d '>' -f2 | cut -d '<' -f1 | xargs)
if [ "$versionGit" != "$versionProject" -a $(git tag | grep -c "$versionProject") -eq 0 ]; then
echo "version=$versionProject" >> $GITHUB_OUTPUT
echo "createtag=true" >> $GITHUB_OUTPUT
exit 0
fi
echo "version=$versionGit" >> $GITHUB_OUTPUT
echo "createtag=false" >> $GITHUB_OUTPUT
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_GIT_SEC }}
- name: Run Buildx & Push Multi Arch for dev
if: steps.extract_branch.outputs.branch == 'dev'
run: |
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t ghcr.io/androidseb25/igotify-notification-assist-dev:latest -t ghcr.io/androidseb25/igotify-notification-assist-dev:${{ steps.infos.outputs.version }} -f ./Dockerfile --provenance=false --sbom=false --output type=image,push=true .
- name: Run Buildx & Push Multi Arch for public
if: steps.extract_branch.outputs.branch != 'dev'
run: |
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t ghcr.io/androidseb25/igotify-notification-assist:latest -t ghcr.io/androidseb25/igotify-notification-assist:${{ steps.infos.outputs.version }} -f ./Dockerfile --provenance=false --sbom=false --output type=image,push=true .
- name: Gotify Notification SUCCESS
if: success()
uses: eikendev/gotify-action@master
with:
gotify_api_base: ${{ secrets.API_BASE }}
gotify_app_token: ${{ secrets.API_TOKEN }}
notification_title: '[DOCKER] iGotify Notification Assist'
notification_message: 'Build success. DEV-Build: ${{ steps.extract_branch.outputs.branch }}'
notification_priority: 0
- name: Gotify Notification FAILED
if: failure()
uses: eikendev/gotify-action@master
with:
gotify_api_base: ${{ secrets.API_BASE }}
gotify_app_token: ${{ secrets.API_TOKEN }}
notification_title: '[DOCKER] iGotify Notification Assist'
notification_message: 'Build failed. DEV-Build: ${{ steps.extract_branch.outputs.branch }}'
notification_priority: 9
- name: Gotify Notification CANCELLED
if: cancelled()
uses: eikendev/gotify-action@master
with:
gotify_api_base: ${{ secrets.API_BASE }}
gotify_app_token: ${{ secrets.API_TOKEN }}
notification_title: '[DOCKER] iGotify Notification Assist'
notification_message: 'Build cancelled. DEV-Build: ${{ steps.extract_branch.outputs.branch }}'
notification_priority: 5