Merge pull request #1 from TimGrt/dev #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Docker Build and Publish | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
publish_to_dockerhub: | |
name: Publish to DockerHub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository. | |
uses: actions/checkout@v4 | |
- name: Login to DockerHub. | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push image. | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./ | |
file: Dockerfile | |
platforms: linux/amd64 | |
push: true | |
tags: timgrt/rhel8-ansible:latest |