added image build workflow
This commit is contained in:
35
.gitea/workflow/build-image.yml
Normal file
35
.gitea/workflow/build-image.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Image Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: sh
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: docker-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Docker Login
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.protron.dev \
|
||||
-u "${{ secrets.REGISTRY_USER }}" --password-stdin
|
||||
|
||||
- name: Docker build
|
||||
run: |
|
||||
docker build \
|
||||
-t git.protron.dev/doc/vintagecontainer:latest \
|
||||
-t git.protron.dev/doc/vintagecontainer:${GITHUB_SHA} \
|
||||
.
|
||||
|
||||
- name: Docker push
|
||||
run: |
|
||||
docker push git.protron.dev/doc/vintagecontainer:latest
|
||||
docker push git.protron.dev/doc/daddvintagecontaineryproxy:${GITHUB_SHA}
|
||||
Reference in New Issue
Block a user