Skip to content

Commit

Permalink
Merge pull request #20 from feuerrot/fixci
Browse files Browse the repository at this point in the history
ci: do release independently from docker build
  • Loading branch information
feuerrot authored Nov 28, 2022
2 parents 4701c07 + 76b7ddd commit c00e7d4
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 35 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: container

on:
push:
tags:
- 'v*'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: type=semver,pattern={{version}}

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
36 changes: 1 addition & 35 deletions .github/workflows/semrel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ on:
branches:
- master

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
tag:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -21,36 +17,6 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
allow-initial-development-versions: true
force-bump-patch-version: true
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: type=semver,pattern={{version}}

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

release:
runs-on: ubuntu-latest
needs: tag
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
Expand Down

0 comments on commit c00e7d4

Please sign in to comment.