Files
immich-power-tools/.github/workflows/docker-release.yml
T
2024-08-20 09:32:52 +05:30

45 lines
1004 B
YAML

name: Docker Release
# on:
# push:
# tags:
# - "v*"
on:
push:
branches:
- feat-docker
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract version from tag
id: extract_version
run: |
VERSION=${GITHUB_REF#refs/tags/}
VERSION=${VERSION#v}
VERSION=0.1.3
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build and push Docker image
run: |
docker build --build-arg VERSION=${{ env.VERSION }} \
--push -t varunraj/immich-power-tools:${{ env.VERSION }} \
-t varunraj/immich-power-tools:latest .