Created
May 22, 2024 20:40
-
-
Save fernandollisboa/0d1e4f875fd92b33dfc74547f7c8072e to your computer and use it in GitHub Desktop.
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: Publish Docker image to Docker Hub | |
on: | |
pull_request: {} | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN}} | |
DOCKER_HUB_REGISTRY: fernandollisboa/checkout-captacao | |
DOCKER_IMAGE: checkout-captacao | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
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: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: fernandollisboa/checkout-captacao | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ env.DOCKER_USERNAME }} | |
password: ${{ env.DOCKER_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
${{ steps.meta.outputs.tags }} | |
${{ env.DOCKER_HUB_REGISTRY }}:latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment