Skip to content

Commit

Permalink
Update apprentice-action-test.yml
Browse files Browse the repository at this point in the history
adding push to Docker Hub
  • Loading branch information
lukehaz authored Nov 3, 2023
1 parent ca6f72a commit c4692ee
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/apprentice-action-test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: build and run Docker image locally and run Liatrio tests
name: Build-Test-Push

on:
push:
branches:
- main

jobs:
build-and-run-docker:
build-and-test:
runs-on: ubuntu-latest

steps:
Expand All @@ -24,4 +24,16 @@ jobs:
docker pull ghcr.io/liatrio/github-actions/apprentice-action:latest
docker run -p 8000:8000 ghcr.io/liatrio/github-actions/apprentice-action:latest
push-to-docker-hub:
needs: build-and-test
runs-on: ubuntu-latest

steps:
- name: log in to Docker Hub
run: docker login -u ${{ secrets.DOCKER_USER_NAME }} -p ${{ secrets.DOCKER_PASSWORD }}

- name: tag Docker image
run: docker tag test-image ${{ secrets.DOCKER_USER_NAME }}/test-image

- name: push Docker image to Docker Hub
run: docker push ${{ secrets.DOCKER_USER_NAME }}/test-image

0 comments on commit c4692ee

Please sign in to comment.