Skip to content

Fix lint workflow

Fix lint workflow #44

Workflow file for this run

name: Docker
on:
push:
paths-ignore:
- 'docs/**'
pull_request:
paths-ignore:
- 'docs/**'
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
USER: sdss
APP: too
REGISTRY: ghcr.io
steps:
- name: Set docker tags
id: set-tags
run: |
if [[ $GITHUB_REF == refs/heads/main ]]
then
echo TAGS=$USER/$APP:latest >> $GITHUB_OUTPUT
elif [[ $GITHUB_REF == refs/heads/* ]]
then
BRANCH=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's/[\/]/_/g')
echo TAGS=$USER/$APP:$BRANCH >> $GITHUB_OUTPUT
else
echo TAGS=$USER/$APP:${GITHUB_REF#refs/tags/} >> $GITHUB_OUTPUT
fi
- name: Show tags
run: echo ${{ steps.set-tags.outputs.TAGS }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/${{ steps.set-tags.outputs.TAGS }}
file: ./container/Dockerfile
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}