Skip to content

Commit

Permalink
Merge pull request janrotter#3 from janrotter/publish_to_dockerhub
Browse files Browse the repository at this point in the history
Publish from semver tags to DockerHub
  • Loading branch information
janrotter authored Apr 6, 2022
2 parents 1b3251b + 9405644 commit 38c850d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/dockerhub-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish semver tags to DockerHub
on:
push:
tags: ["v*.*.*"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: jrotter/bloblo
tags: |
type=semver,pattern={{version}}
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion .github/workflows/go-semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v3
- uses: go-semantic-release/action@v1
with:
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
Expand Down

0 comments on commit 38c850d

Please sign in to comment.