1
0
mirror of https://github.com/stryan/mumble-discord-bridge.git synced 2024-11-22 13:25:45 -05:00

chore: seperate binary and docker actions

This commit is contained in:
Tyler Stiene 2021-12-15 01:11:31 -05:00
parent 4b941100fc
commit 52c3132424
2 changed files with 37 additions and 11 deletions

33
.github/workflows/build-docker.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: 'Docker'
on:
create:
tags:
- v*
jobs:
docker-build-push:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
if: startsWith(github.ref, 'refs/tags/')
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: stieneee/mumble-discord-bridge:latest,stieneee/mumble-discord-bridge:${{ github.ref_name }},ghcr.io/stieneee/mumble-discord-bridge:latest,ghcr.io/stieneee/mumble-discord-bridge:${{ github.ref_name }}

View File

@ -16,8 +16,8 @@ jobs:
with:
fetch-depth: 0
- name: Install libopus-dev
run: sudo apt update && sudo apt-get -y install libopus-dev
- name: Install libopus-dev zip
run: sudo apt update && sudo apt-get -y install libopus-dev zip
- name: Set up Go
uses: actions/setup-go@v2
@ -28,20 +28,13 @@ jobs:
run: go install github.com/google/go-licenses@latest
- name: go-license save
run: go-licenses save ./cmd/mumble-discord-bridge --force --save_path="./LICENSES"
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
if: startsWith(github.ref, 'refs/tags/')
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
run: go-licenses save ./cmd/mumble-discord-bridge --force --save_path="./LICENSES" && zip -r -9 LICENSES.zip ./LICENSES
- name: Run GoReleaser Build
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: build --rm-dist
args: build --rm-dist --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}