mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
build: run docker release on branches (#130)
This commit is contained in:
parent
fe06363530
commit
bdbdab1f18
1 changed files with 17 additions and 11 deletions
24
.github/workflows/docker.yml
vendored
24
.github/workflows/docker.yml
vendored
|
@ -2,8 +2,11 @@ name: docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
- "develop"
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- 'v*'
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
packages: write
|
packages: write
|
||||||
|
@ -19,9 +22,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Get the tag name
|
|
||||||
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
|
@ -29,14 +29,20 @@ jobs:
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Extract metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v3
|
||||||
|
with:
|
||||||
|
images: ghcr.io/autobrr/autobrr
|
||||||
|
|
||||||
|
- name: Build and publish image
|
||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
push: true
|
context: .
|
||||||
tags: |
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
ghcr.io/autobrr/autobrr:${{ env.TAG }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
ghcr.io/autobrr/autobrr:latest
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
- name: Image digest
|
- name: Image digest
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue