Skip to content

Commit

Permalink
push.yml update (#139)
Browse files Browse the repository at this point in the history
Co-authored-by: Lee Sungjin <sodyn99@gmail.com>
  • Loading branch information
yhm1620 and sodyn99 committed May 31, 2024
1 parent ef38b1d commit f6b4005
Showing 1 changed file with 40 additions and 29 deletions.
69 changes: 40 additions & 29 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,20 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image
- name: Build and push Docker image with tag latest
env:
DOCKER_TAG: test
DOCKER_TAG: latest
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
git clone https://github.com/onosproject/build-tools.git build/build-tools
make images
docker push ${{ env.DOCKER_REPOSITORY }}onos-kpimon:${{ env.DOCKER_TAG }}
- name: Build and push Docker image with tag version
if: steps.version-change.outputs.changed == 'true'
env:
DOCKER_TAG: v${{ needs.tag-github.outputs.version }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
Expand Down Expand Up @@ -113,33 +124,33 @@ jobs:
"generate_release_notes": true
}'
release-image:
runs-on: ubuntu-latest
needs: tag-github
if: needs.tag-github.outputs.changed == 'true'
env:
REGISTRY: docker.io
DOCKER_REPOSITORY: onosproject/
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- uses: docker/login-action@v3.1.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push release Docker image
env:
DOCKER_TAG: test-v${{ needs.tag-github.outputs.version }}
run: |
git clone https://github.com/onosproject/build-tools.git build/build-tools
make images
docker push ${{ env.DOCKER_REPOSITORY }}onos-kpimon:${{ env.DOCKER_TAG }}
#release-image:
# runs-on: ubuntu-latest
# needs: tag-github
# if: needs.tag-github.outputs.changed == 'true'
# env:
# REGISTRY: docker.io
# DOCKER_REPOSITORY: onosproject/
# steps:
# - uses: actions/checkout@v4
#
# - uses: actions/setup-go@v5
# with:
# go-version-file: 'go.mod'
#
# - uses: docker/login-action@v3.1.0
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: Build and push release Docker image
# env:
# DOCKER_TAG: ${{ needs.tag-github.outputs.version }}
# run: |
# git clone https://github.com/onosproject/build-tools.git build/build-tools
# make images
# docker push ${{ env.DOCKER_REPOSITORY }}onos-kpimon:${{ env.DOCKER_TAG }}

update-version:
runs-on: ubuntu-latest
Expand Down

0 comments on commit f6b4005

Please sign in to comment.