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