mirror of
https://github.com/darmiel/yaxc.git
synced 2024-11-13 03:05:40 +08:00
Added deploy action to docker hub
This commit is contained in:
parent
31c3837fbe
commit
d9cf410cdb
1 changed files with 32 additions and 0 deletions
32
.github/workflows/deploy_hub_tags.yml
vendored
Normal file
32
.github/workflows/deploy_hub_tags.yml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
name: Deploy to docker hub (v-tag)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- name: Login to docker hub
|
||||
if: success()
|
||||
uses: actions-hub/docker/login@master
|
||||
env:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build image
|
||||
if: success()
|
||||
run: docker build -t ${GITHUB_REPOSITORY}:${IMAGE_TAG} .
|
||||
|
||||
- name: Push to docker registry
|
||||
if: success()
|
||||
uses: actions-hub/docker@master
|
||||
with:
|
||||
args: push ${GITHUB_REPOSITORY}:${IMAGE_TAG}
|
Loading…
Reference in a new issue