Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
syynek committed Dec 18, 2023
1 parent 16740a2 commit 006af4d
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Docker Image Build

on:
push:
branches:
- master
workflow_call:
inputs:
dockertag:
required: true
type: string

env:
IMAGE_ID: "ghcr.io/exo-opensource/mta-gamemode"
Expand Down Expand Up @@ -41,4 +43,4 @@ jobs:
labels: "runnumber=${GITHUB_RUN_ID}"
platforms: "linux/amd64"
push: true
tags: "${{ env.IMAGE_ID }}:latest"
tags: "${{ env.IMAGE_ID }}:${{ inputs.dockertag }}"
20 changes: 20 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Pushes

on:
push:
branches:
- master
- release/production

jobs:
build-development:
if: github.ref == 'refs/heads/master'
uses: ./.github/workflows/build-docker.yml
with:
dockertag: latest

build-production:
if: github.ref == 'refs/heads/release/production'
uses: ./.github/workflows/build-docker.yml
with:
dockertag: stable
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Releases

on:
workflow_dispatch:
inputs:
version:
type: string
description: 'Release Version'
required: true
name:
type: string
description: 'Release Name'
required: false

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: ./.github/workflows/build-docker.yml
with:
dockertag: ${{ inputs.version }}

- uses: actions/checkout@v3

- uses: ncipollo/release-action@v1
with:
tag: ${{ inputs.version }}
name: ${{ inputs.name }}

0 comments on commit 006af4d

Please sign in to comment.