add github actions

This commit is contained in:
Jun Kurihara 2022-07-05 21:44:55 +09:00
commit baa23e5925
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
4 changed files with 74 additions and 0 deletions

34
.github/workflows/docker_build_push.yml vendored Normal file
View 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