Skip to content

Commit

Permalink
fix get tag issue
Browse files Browse the repository at this point in the history
  • Loading branch information
steveyiyo committed Jan 30, 2023
1 parent ff30113 commit adaa39e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ name: Docker image build and push

on:
push:
branches:
- main
tags:
- v*
- '*'

jobs:
docker:
Expand All @@ -24,13 +22,19 @@ jobs:
registry: docker-registry.steveyi.net
username: ${{ secrets.STEVEYI_DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.STEVEYI_DOCKER_REGISTRY_PASSWORD }}
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
# Optionally strip `v` prefix
strip_v: false
- name: Build and push Docker images
uses: docker/[email protected]
with:
push: true
tags: |
docker-registry.steveyi.net/steveyi-service/whois-search:latest
docker-registry.steveyi.net/steveyi-service/whois-search:${{ github.ref_name }}
docker-registry.steveyi.net/steveyi-service/whois-search:${{steps.tag.outputs.tag}}
# - name: Deploy to VM
# uses: appleboy/ssh-action@master
# with:
Expand Down

0 comments on commit adaa39e

Please sign in to comment.