Skip to content

Commit

Permalink
Merge pull request #15 from wiemanboy/feature/split-up-workflows
Browse files Browse the repository at this point in the history
UPDATE: split up workflow
  • Loading branch information
wiemanboy authored Sep 19, 2024
2 parents b84a075 + 86d54be commit f1335eb
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 10 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/create-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Authorize in Docker Hub
uses: docker/login-action@v1
Expand All @@ -30,12 +30,4 @@ jobs:
push: true
tags: |
${{ secrets.DOCKER_HUB_USERNAME }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ vars.NEXT_VERSION }}
${{ github.ref == 'refs/heads/master' && format('{0}/{1}:latest', secrets.DOCKER_HUB_USERNAME, vars.DOCKER_IMAGE_NAME) || '' }}
- name: Create release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.TOKEN }}"
automatic_release_tag: ${{ vars.NEXT_VERSION }}
prerelease: false
title: "${{ github.event.repository.name }} v${{ vars.NEXT_VERSION }}"
${{ github.ref == 'refs/heads/master' && format('{0}/{1}:latest', secrets.DOCKER_HUB_USERNAME, vars.DOCKER_IMAGE_NAME) || '' }}
20 changes: 20 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Create release

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


jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Create release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.TOKEN }}"
automatic_release_tag: ${{ vars.NEXT_VERSION }}
prerelease: false
title: "${{ github.event.repository.name }} v${{ vars.NEXT_VERSION }}"
21 changes: 21 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Run tests

on:
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.1'

- name: Run tests
run: go test ./...

0 comments on commit f1335eb

Please sign in to comment.