Skip to content

Commit

Permalink
switch to login-action
Browse files Browse the repository at this point in the history
  • Loading branch information
jjethwa authored Apr 6, 2023
1 parent 72510e3 commit b5326f0
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@ on:
branches: [ "master" ]

jobs:

build:

push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Docker login
env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- name: Check out the repo
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{secrets.DOCKER_USER}}
password: ${{secrets.DOCKER_PASSWORD}}

- name: Build the Docker image
run: docker build . --file Dockerfile --tag jordan/icinga2:latest

- name: Docker Push
run: docker push jordan/icinga2:latest

0 comments on commit b5326f0

Please sign in to comment.