feat: update docker images to v0.0.20 and remove unused cleanup logic… #75
This file contains hidden or 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: Build and push server image | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_REF_TYPE: ${{ github.ref_type }} | |
GITHUB_REF_NAME: ${{ github.ref_name }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: docker/setup-buildx-action@v2 | |
- uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set image tag | |
id: vars | |
run: | | |
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then | |
echo "TAG=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT | |
else | |
echo "TAG=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_OUTPUT | |
fi | |
- uses: docker/build-push-action@v4 | |
with: | |
context: server | |
file: server/Dockerfile.server | |
push: true | |
tags: skeptrune/jukebox-server:${{ steps.vars.outputs.TAG }} |