Skip to content

Commit

Permalink
build: split build workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
biodrone committed Jan 18, 2022
1 parent 8dbbdc8 commit e138f6c
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,7 @@ jobs:
prepend: true
update-file: pyproject.toml

- name: Dockerhub Push Staging
if: ${{ github.ref == 'refs/heads/staging' }}
id: dockerhub_staging_push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64, linux/arm64, linux/armhf
push: true
tags: |
dangeroustech/streamdl:latest
dangeroustech/streamdl:staging
- name: Dockerhub Push Stable
if: ${{ github.ref == 'refs/heads/master' }}
id: dockerhub_stable_push
uses: docker/build-push-action@v2
with:
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/deploy_staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: "Dockerhub Build"

on:
push:
branches: [ staging ]

jobs:
docker:
name: Docker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker Build
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
load: true
tags: dangeroustech/streamdl:latest

- name: Version
uses: go-semantic-release/action@v1
id: semrel
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
force-bump-patch-version: true
changelog-generator-opt: "emojis=true"
changelog-file: "CHANGELOG.md"
prepend: true
update-file: pyproject.toml

- name: Dockerhub Push Staging
id: dockerhub_staging_push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64, linux/arm64, linux/armhf
push: true
tags: |
dangeroustech/streamdl:latest
dangeroustech/streamdl:staging

0 comments on commit e138f6c

Please sign in to comment.