mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
build: update and split gh workflows (#88)
This commit is contained in:
parent
8ff8e6bbb0
commit
ca6241e7cb
3 changed files with 45 additions and 28 deletions
41
.github/workflows/docker.yml
vendored
Normal file
41
.github/workflows/docker.yml
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
name: docker
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
name: Build and publish Docker images
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get the tag name
|
||||
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/autobrr/autobrr:${{ env.TAG }}
|
||||
ghcr.io/autobrr/autobrr:latest
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
30
.github/workflows/release.yml
vendored
30
.github/workflows/release.yml
vendored
|
@ -10,6 +10,7 @@ permissions:
|
|||
|
||||
jobs:
|
||||
goreleaser:
|
||||
name: Build and publish Go binaries
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
@ -32,7 +33,7 @@ jobs:
|
|||
name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
go-version: 1.17.6
|
||||
-
|
||||
name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
|
@ -42,30 +43,3 @@ jobs:
|
|||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get the tag name
|
||||
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/autobrr/autobrr:${{ env.TAG }}
|
||||
ghcr.io/autobrr/autobrr:latest
|
||||
|
|
|
@ -32,6 +32,8 @@ RUN make -f Makefile build/ctl
|
|||
# build runner
|
||||
FROM alpine:latest
|
||||
|
||||
LABEL org.opencontainers.image.source = "https://github.com/autobrr/autobrr"
|
||||
|
||||
ENV HOME="/config" \
|
||||
XDG_CONFIG_HOME="/config" \
|
||||
XDG_DATA_HOME="/config"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue