Skip to content

Commit d492a27

Browse files
author
wlanboy
committed
Updated action, added permission
1 parent 6ecb06f commit d492a27

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/dockerpublish.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,20 @@ on:
44
tags:
55
- '*d'
66
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
711
jobs:
812
build:
913
runs-on: ubuntu-latest
1014
steps:
1115
- uses: actions/checkout@v6
12-
- name: Publish to Registry
13-
env:
14-
DOCKER_USER: ${{secrets.DOCKER_USERNAME}}
15-
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
16-
run: |
17-
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
16+
- name: Log in to Docker Hub
17+
uses: docker/login-action@v4
18+
with:
19+
username: ${{ secrets.DOCKER_USERNAME }}
20+
password: ${{ secrets.DOCKER_PASSWORD }}
1821
- name: Build the Docker image
1922
run: docker build -t wlanboy/javahttpclient:latest .
2023
- name: Docker Push

0 commit comments

Comments
 (0)