Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
use buildx + docker login no workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
vschettino committed Dec 9, 2020
1 parent bff884c commit 6d28c18
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ jobs:
draft: false
prerelease: false
docker_push:
name: Push image to docker registry
name: Push image Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker Build
run: docker build -t passeidireto/trigger-external-workflow-action .
- name: Docker Tag
run: |
docker tag passeidireto/trigger-external-workflow-action passeidireto/trigger-external-workflow-action:latest
docker tag passeidireto/trigger-external-workflow-action passeidireto/trigger-external-workflow-action:${GITHUB_REF/refs\/tags\/v/}
- name: Docker Push
run: docker push passeidireto/trigger-external-workflow-action
- name: Find Git Tag
run: echo "TAG=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Docker Build and Push
uses: docker/build-push-action@v2
with:
push: true
tags: |
passeidireto/trigger-external-workflow-action:latest
passeidireto/trigger-external-workflow-action:${{ env.TAG }}

0 comments on commit 6d28c18

Please sign in to comment.