Skip to content

Ralftar/email2 (#56) #40

Ralftar/email2 (#56)

Ralftar/email2 (#56) #40

Workflow file for this run

name: Publish
on:
push:
paths:
- 'VERSION'
branches:
- main
env:
APP_NAME: 'clouddump'
jobs:
publish:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: Build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get version from VERSION-file
run: echo "version=$(cat VERSION | head -n 1)" >> $GITHUB_ENV
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build Docker Image
run: |
cp dockerfile-opensuse/Dockerfile .
docker build \
--tag ghcr.io/vendanor/${{env.APP_NAME}}:${{env.version}} \
--tag ghcr.io/vendanor/${{env.APP_NAME}}:latest \
${{github.workspace}}
- name: Publish Docker image
run: docker push --all-tags ghcr.io/vendanor/${{env.APP_NAME}}