test build and push

This commit is contained in:
Abner Rizzi 2023-08-10 07:14:22 -03:00
parent 641ee99f30
commit f6569151e8
1 changed files with 19 additions and 19 deletions

View File

@ -1,30 +1,30 @@
name: Build and Push Docker Image to GHCR
name: ci
on:
push:
branches:
- main # Change this to the appropriate branch if needed
- main
- gh-action
jobs:
build-and-push:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker image
run: |
docker buildx create --use
docker buildx build --push -t ghcr.io/${{ github.repository }}:latest -f Dockerfile.base .
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: user/app:latest