Skip to content

Commit

Permalink
Merge pull request #1 from licenseplated/deploy-to-dockerhub
Browse files Browse the repository at this point in the history
Add dockerhub deploy action
  • Loading branch information
licenseplated authored May 19, 2022
2 parents 83e5097 + bd9ff55 commit ae4f310
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build and Deploy to Dockerhub
on:
push:
tags: '*'
branches: 'master'
jobs:
deploy:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: echo "TAG=$( [[ ${GITHUB_REF_TYPE} == 'tag' ]] && echo ${GITHUB_REF_NAME} || echo 'latest')" >> $GITHUB_ENV
- run: docker build -t ${{ secrets.DOCKERHUB_REPO }}:${{ env.TAG }} .
- run: docker push ${{ secrets.DOCKERHUB_REPO }}:${{ env.TAG }}

0 comments on commit ae4f310

Please sign in to comment.