self hosted runner
This commit is contained in:
34
.github/workflows/docker-build-self.yml
vendored
Normal file
34
.github/workflows/docker-build-self.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
name: Build and Push Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- test
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: self-hosted
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Build Docker image
|
||||||
|
run: |
|
||||||
|
docker build -t "ghcr.io/jurajkubrican/knet/go-web-server:latest" .
|
||||||
|
|
||||||
|
# - name: Log in to GitHub Container Registry
|
||||||
|
# uses: docker/login-action@v2
|
||||||
|
# with:
|
||||||
|
# registry: ghcr.io
|
||||||
|
# username: ${{ github.actor }}
|
||||||
|
# password: ${{ secrets.CR_PAT }}
|
||||||
|
|
||||||
|
# - name: Push Docker image to GitHub Container Registry
|
||||||
|
# run: |
|
||||||
|
# docker push "ghcr.io/jurajkubrican/knet/go-web-server:latest"
|
||||||
|
|
||||||
|
# - name: Verify image is pushed
|
||||||
|
# run: |
|
||||||
|
# echo "Docker image pushed to: ghcr.io/jurajkubrican/knet/go-web-server:latest"
|
||||||
Reference in New Issue
Block a user