Skip to content

Feat: Add links to official home page of Fediseer and a blog post (#10) #33

Feat: Add links to official home page of Fediseer and a blog post (#10)

Feat: Add links to official home page of Fediseer and a blog post (#10) #33

Workflow file for this run

name: Publish docker
on:
workflow_dispatch:
push:
branches:
- master
tags:
- v*
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Extract Version Name
id: extract_version
uses: actions/github-script@v6
with:
result-encoding: string
script: |
if (context.payload.ref.startsWith('refs/tags/')) {
return context.payload.ref.replace(/refs\/tags\/v/, '');
}
return 'dev';
- name: Checkout code
uses: actions/checkout@v3
- name: Build docker
env:
VERSION: ${{ steps.extract_version.outputs.result }}
run: docker build -t ghcr.io/rikudousage/fediseer-gui:$VERSION --label "org.opencontainers.image.source=https://github.com/RikudouSage/FediseerGUI" --label "org.opencontainers.image.licenses=MIT" .
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to docker
env:
VERSION: ${{ steps.extract_version.outputs.result }}
run: docker push ghcr.io/rikudousage/fediseer-gui:$VERSION
- name: Push latest to docker
if: steps.extract_version.outputs.result != 'dev'
env:
VERSION: ${{ steps.extract_version.outputs.result }}
run: |
docker tag ghcr.io/rikudousage/fediseer-gui:$VERSION ghcr.io/rikudousage/fediseer-gui:latest
docker push ghcr.io/rikudousage/fediseer-gui:latest