Skip to content

Commit eedc982

Browse files
authored
Login step in place
1 parent ed37506 commit eedc982

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/docker-image.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v3
17-
- name: Build the Docker image
18-
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
- name: Docker login
21+
env:
22+
DOCKER_USER: ${{ secrets.DOCKER_USER }}
23+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
24+
run: |
25+
echo "Starting login..."
26+
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
27+
echo "Login ended"
28+
# - name: Build the Docker image
29+
# run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)

0 commit comments

Comments
 (0)