Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vladi14 committed Nov 11, 2023
1 parent 393197d commit 91472b5
Showing 1 changed file with 30 additions and 11 deletions.
41 changes: 30 additions & 11 deletions .github/workflows/github-actions-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,38 @@ jobs:
name: my-artifact
path: ${{ github.workspace }}/myapp/target/*.jar

docker-image:
name: Publish to Docker Hub

publish:
runs-on: ubuntu-latest
needs: [build]
env:
NEXT_VERSION: ${{ needs.build.outputs.version }}
needs: build
steps:
- uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_UNAME }}
password: ${{ secrets.DOCKER_KEY }}
- name: Checkout Code
uses: actions/checkout@v4

# - name: Build Docker Image
# run: |
# ls -l
# docker build -t my-docker-image:${{ github.run_number }} -f ${{ github.workspace }}/Dockerfile .
# docker tag my-docker-image:${{ github.run_number }} my-docker-image:$APP_VERSION

- name: Push Docker Image to Docker Hub
run: |
echo ${{ secrets.DOCKER_KEY }} | docker login -u ${{ secrets.DOCKER_UNAME }} --password-stdin
# docker-image:
# name: Publish to Docker Hub
# runs-on: ubuntu-latest
# needs: [build]
# env:
# NEXT_VERSION: ${{ needs.build.outputs.version }}
# steps:
# - uses: actions/checkout@v2
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKER_UNAME }}
# password: ${{ secrets.DOCKER_KEY }}

# - name: Build Docker image
# uses: docker/build-push-action@v4
Expand Down

0 comments on commit 91472b5

Please sign in to comment.