Skip to content

Commit

Permalink
ci: add Docker push action
Browse files Browse the repository at this point in the history
  • Loading branch information
okainov committed Jun 2, 2022
1 parent 4b35bc4 commit aa82a34
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This is a basic workflow to help you get started with Actions

name: Push to Docker hub

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
release:
types: [published]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
push:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: okainov/mantisbt

- 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 }}

0 comments on commit aa82a34

Please sign in to comment.