add github actions
This commit is contained in:
parent
bc10abc40a
commit
baa23e5925
4 changed files with 74 additions and 0 deletions
34
.github/workflows/docker_build_push.yml
vendored
Normal file
34
.github/workflows/docker_build_push.yml
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
name: Build and Publish Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build_and_push:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
IMAGE_NAME: rpxy
|
||||
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
|
||||
file: ./Dockerfile
|
||||
Loading…
Add table
Add a link
Reference in a new issue