Skip to content

Commit

Permalink
Update github action to push docker container to registry
Browse files Browse the repository at this point in the history
  • Loading branch information
vanderlan committed Oct 8, 2023
1 parent 645d54a commit 49df0a9
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,27 @@ jobs:
run: dotnet restore
- name: Build
run: dotnet build --no-restore

push_to_registry:

docker:
runs-on: ubuntu-22.04
needs: [build]
name: DockerHub Publish
runs-on: ubuntu-22.04
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Push to Docker Hub
uses: docker/build-push-action@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: vanderlangs/orion-api
tag_with_ref: true
push: ${{ github.event_name != 'pull_request' }}
tags: vanderlangs/orion-api:latest

0 comments on commit 49df0a9

Please sign in to comment.