mirror of
https://github.com/Stone-Red-Code/RemoteExec.git
synced 2026-09-07 23:41:52 +02:00
Add GitHub Action for Docker worker build
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
name: Build and Push Docker Worker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/RemoteExec.Worker/**'
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
if: contains(github.event.head_commit.modified, 'src/RemoteExec.Worker/') || contains(github.event.head_commit.added, 'src/RemoteExec.Worker/') || contains(github.event.head_commit.removed, 'src/RemoteExec.Worker/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Build & Push Worker Image
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- name: Build the Docker image
|
||||||
|
run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/remoteexec-worker:latest ./src/RemoteExec.Worker
|
||||||
|
- name: Push the Docker image
|
||||||
|
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/remoteexec-worker:latest
|
||||||
Reference in New Issue
Block a user