mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-05 09:29:32 +00:00
Consolidate workflows
This commit is contained in:
55
.github/workflows/docker.yml
vendored
Normal file
55
.github/workflows/docker.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
name: docker
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build container
|
||||
run: docker build .
|
||||
|
||||
deploy-latest:
|
||||
if: ${{ github.event_name == 'push' && github.ref_type == 'branch' && github.ref_name == 'master' }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Login to DockerHub
|
||||
run: docker login -u tyrrrz -p ${{ secrets.DOCKER_TOKEN }}
|
||||
|
||||
- name: Build container
|
||||
run: docker build -t tyrrrz/discordchatexporter:latest .
|
||||
|
||||
- name: Push container
|
||||
run: docker push tyrrrz/discordchatexporter:latest
|
||||
|
||||
deploy-stable:
|
||||
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Get release version
|
||||
id: get_version
|
||||
uses: dawidd6/action-get-tag@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
run: docker login -u tyrrrz -p ${{ secrets.DOCKER_TOKEN }}
|
||||
|
||||
- name: Build container
|
||||
run: docker build -t tyrrrz/discordchatexporter:stable .
|
||||
|
||||
- name: Push container (stable)
|
||||
run: docker push tyrrrz/discordchatexporter:stable
|
||||
|
||||
- name: Push container (${{ steps.get_version.outputs.tag }})
|
||||
run: docker push tyrrrz/discordchatexporter:${{ steps.get_version.outputs.tag }}
|
||||
Reference in New Issue
Block a user