Skip to content

Commit

Permalink
feat(action): add workflow to push image (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
beiertu-mms authored Apr 28, 2023
1 parent b210d65 commit 4fe3961
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "docker"
Expand All @@ -8,3 +9,10 @@ updates:
commit-message:
prefix: "chore(docker): "

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "chore(actions): "

42 changes: 42 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
docker.io/tungbeier/gcloud-pubsub-emulator
flavor: |
latest=auto
tags: |
type=semver,pattern={{version}}
labels: |
org.opencontainers.image.vendor=tungbeier
org.opencontainers.image.maintainer=tung.beier@gmx.de
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

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

0 comments on commit 4fe3961

Please sign in to comment.