Skip to content

Remove stale bot

Remove stale bot #232

Workflow file for this run

name: Publish docker
on:
workflow_dispatch:
push:
branches:
- master
tags:
- v*
jobs:
publish:
permissions: write-all
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/fediseer/fediseer-gui:$VERSION --label "org.opencontainers.image.source=https://github.com/Fediseer/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/fediseer/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/fediseer/fediseer-gui:$VERSION ghcr.io/fediseer/fediseer-gui:latest
docker push ghcr.io/fediseer/fediseer-gui:latest