Skip to content

update: docker

update: docker #9

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
- "v*.*.*-hotfix.*"
- "v*.*.*-nightly"
- "v*.*.*-alpha"
- "v*.*.*-beta"
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set ghcr.io url
run: |
echo "REPO=${GITHUB_REPOSITORY@L}" >> "${GITHUB_ENV}"
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ env.REPO }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Environment
run: |
echo "SPOTIFY_CLIENT_ID=${{ secrets.SPOTIFY_CLIENT_ID }}" >> $GITHUB_ENV
echo "SPOTIFY_CLIENT_SECRET=${{ secrets.SPOTIFY_CLIENT_SECRET }}" >> $GITHUB_ENV
echo "GH_TOKEN=${{ secrets.GH_TOKEN }}" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# deploy:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: Deploy to server
# uses: appleboy/ssh-action@v1.0.3
# with:
# host: ${{ secrets.SERVER_HOST }}
# username: ${{ secrets.SERVER_USERNAME }}
# password: ${{ secrets.SERVER_PASSWORD }}
# key: ${{ secrets.SERVER_SSH_KEY }}
# port: ${{ secrets.SERVER_PORT }}
# script: |
# docker-compose down links
# docker-compose pull
# docker-compose up links -d