Update .gitea/workflows/docker-push.yaml
All checks were successful
Build and Push Docker Image / build (push) Successful in 2s
All checks were successful
Build and Push Docker Image / build (push) Successful in 2s
This commit is contained in:
parent
41a8dc0db4
commit
bdf24eea1e
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
name: Build and Push Docker Image
|
name: Build and Push Docker Image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@ -19,23 +20,24 @@ jobs:
|
|||||||
echo "exists=true" >> $GITHUB_ENV
|
echo "exists=true" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
echo "exists=false" >> $GITHUB_ENV
|
echo "exists=false" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Set repository name as image name
|
- name: Set repository name as image name
|
||||||
if: env.exists == 'true'
|
if: env.exists == 'true'
|
||||||
run: echo "IMAGE_NAME=${{ github.repository }}" >> $GITHUB_ENV
|
run: echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
|
||||||
- name: Log in to Docker registry
|
- name: Log in to Docker registry
|
||||||
if: env.exists == 'true'
|
if: env.exists == 'true'
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.ionas999.at -u ${{ secrets.REGISTRY_USERNAME }} --password-stdin
|
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.ionas999.at -u ${{ secrets.REGISTRY_USERNAME }} --password-stdin
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
if: env.exists == 'true'
|
if: env.exists == 'true'
|
||||||
run: |
|
run: |
|
||||||
docker build -t git.ionas999.at/${{ env.IMAGE_NAME }}:latest .
|
docker build -t git.ionas999.at/${{ env.IMAGE_NAME }}:latest .
|
||||||
|
|
||||||
- name: Push Docker image
|
- name: Push Docker image
|
||||||
if: env.exists == 'true'
|
if: env.exists == 'true'
|
||||||
run: |
|
run: |
|
||||||
docker push git.ionas999.at/${{ env.IMAGE_NAME }}:latest
|
docker push git.ionas999.at/${{ env.IMAGE_NAME }}:latest
|
||||||
Loading…
Reference in New Issue
Block a user