update github actions
update github actions
This commit is contained in:
parent
9b95cc1b17
commit
9789c23dcf
1 changed files with 20 additions and 3 deletions
23
.github/workflows/docker_build_push.yml
vendored
23
.github/workflows/docker_build_push.yml
vendored
|
|
@ -4,6 +4,7 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
- develop
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_push:
|
build_and_push:
|
||||||
|
|
@ -12,11 +13,14 @@ jobs:
|
||||||
IMAGE_NAME: rpxy
|
IMAGE_NAME: rpxy
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: GitHub Environment
|
||||||
|
run: echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
|
@ -26,7 +30,8 @@ jobs:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push x86_64
|
- name: Release build and push x86_64
|
||||||
|
if: ${{ env.BRANCH == 'main' }}
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
|
@ -34,7 +39,9 @@ jobs:
|
||||||
tags: |
|
tags: |
|
||||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
|
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
|
||||||
file: ./docker/amd64/Dockerfile
|
file: ./docker/amd64/Dockerfile
|
||||||
- name: Build and push x86_64-slim
|
|
||||||
|
- name: Release build and push x86_64-slim
|
||||||
|
if: ${{ env.BRANCH == 'main' }}
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
|
@ -42,3 +49,13 @@ jobs:
|
||||||
tags: |
|
tags: |
|
||||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:slim, ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest-slim
|
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:slim, ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest-slim
|
||||||
file: ./docker/amd64-slim/Dockerfile
|
file: ./docker/amd64-slim/Dockerfile
|
||||||
|
|
||||||
|
- name: Nightly build and push x86_64
|
||||||
|
if: ${{ env.BRANCH == 'develop' }}
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:nightly
|
||||||
|
file: ./docker/amd64/Dockerfile
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue