This commit is contained in:
26
.gitea/workflows/build-test.yaml
Normal file
26
.gitea/workflows/build-test.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Log into Gitea Container Registry
|
||||
run: |
|
||||
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login ${{ vars.LOCAL_INSTANCE_IP }} -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
docker pull hello-world
|
||||
docker tag docker.io/library/hello-world:latest ${{ vars.LOCAL_INSTANCE_IP }}/hello-world:latest
|
||||
docker images
|
||||
|
||||
- name: Push Docker image
|
||||
run: |
|
||||
docker push ${{ vars.LOCAL_INSTANCE_IP }}/${{ secrets.DOCKER_USERNAME }}/hello-world:latest
|
||||
Reference in New Issue
Block a user