Clarify that the domain will not be removed #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |