Add GitHub workflow to build docker image #2
Workflow file for this run
This file contains hidden or 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: Build Workflow | |
on: | |
push: | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
name: Set up Docker Buildx | |
- uses: docker/login-action@v3 | |
name: Login to DockerHub | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: docker/build-push-action@v6 | |
name: Build and Push WebApp Image | |
id: docker_build | |
with: | |
context: . | |
push: true | |
tags: orgsinfo/webapp2:${{ github.ref_name }} | |
- name: WebApp Image Digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |