Bump version: 0.5.3 → 0.5.4a0 #85
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: Docker | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
paths-ignore: | |
- 'docs/**' | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
env: | |
USER: sdss | |
APP: lvmieb | |
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@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
tags: ghcr.io/${{ steps.set-tags.outputs.TAGS }} | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |