changed publish workflow
This commit is contained in:
@@ -35,16 +35,24 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [test]
|
needs: [test]
|
||||||
if: gitea.ref == 'refs/heads/release'
|
if: gitea.ref == 'refs/heads/release'
|
||||||
env:
|
|
||||||
repository_host: 192.168.1.2:5000
|
|
||||||
repository_name: ${{ gitea.repository }}
|
|
||||||
repository_tag: latest
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
-
|
||||||
- name: Build
|
name: Build and push
|
||||||
run: docker build . --file Dockerfile --tag ${repository_name}:${repository_tag}
|
uses: docker/build-push-action@v4
|
||||||
- name: Tag
|
with:
|
||||||
run: docker tag ${repository_name}:${repository_tag} ${repository_host}/${repository_name}:${repository_tag}
|
context: .
|
||||||
- name: Push
|
push: true
|
||||||
run: docker push ${repository_host}/${repository_name}:${repository_tag}
|
tags: user/app:v0.2.0
|
||||||
|
# env:
|
||||||
|
# repository_host: 192.168.1.2:5000
|
||||||
|
# repository_name: ${{ gitea.repository }}
|
||||||
|
# repository_tag: latest
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v3
|
||||||
|
# - name: Build
|
||||||
|
# run: docker build . --file Dockerfile --tag ${repository_name}:${repository_tag}
|
||||||
|
# - name: Tag
|
||||||
|
# run: docker tag ${repository_name}:${repository_tag} ${repository_host}/${repository_name}:${repository_tag}
|
||||||
|
# - name: Push
|
||||||
|
# run: docker push ${repository_host}/${repository_name}:${repository_tag}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user