Created
August 21, 2024 14:49
-
-
Save inneroot/edcfbf41463b9532df7d4e7e9bc4dcdb to your computer and use it in GitHub Desktop.
Build and push docker contaienr to dockerhub
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
# .github/workflows/dockerization.yml | |
name: Build release Docker image | |
on: | |
push: | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: true | |
tags: ${{ secrets.DOCKERHUB_TAG }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment