Bump cn-infra version #958
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker | |
on: | |
push: | |
branches: | |
- master | |
- release/* | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
- 'v[0-9]+.[0-9]+.[0-9]+-beta' | |
- 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+' | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dev image | |
run: make dev-image | |
- name: Prod image | |
run: make prod-image | |
- name: List images | |
run: docker images | |
deploy-latest: | |
name: deploy latest | |
needs: build | |
runs-on: ubuntu-20.04 | |
if: github.event_name == 'push' && contains(github.ref, 'master') | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dev image | |
run: make dev-image | |
- name: Prod image | |
run: make prod-image | |
- name: Tag images | |
run: | | |
docker tag dev_vpp_agent ligato/dev-vpp-agent:latest | |
docker tag prod_vpp_agent ligato/vpp-agent:latest | |
- name: Docker Login | |
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | |
- name: Push images | |
run: | | |
docker push ligato/vpp-agent:latest | |
deploy-tag: | |
name: deploy version | |
needs: build | |
runs-on: ubuntu-20.04 | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dev image | |
run: make dev-image | |
- name: Prod image | |
run: make prod-image | |
- name: Get tag | |
id: vars | |
run: | | |
echo ::set-output name=tag::$(echo ${GITHUB_REF:10}) | |
echo ::group::Env vars | |
echo $(env | sort) | |
echo ::endgroup:: | |
- name: Tag images | |
run: | | |
docker tag dev_vpp_agent ligato/dev-vpp-agent:${{ steps.vars.outputs.tag }} | |
docker tag prod_vpp_agent ligato/vpp-agent:${{ steps.vars.outputs.tag }} | |
- name: Docker Login | |
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | |
- name: Push images | |
run: | | |
docker push ligato/vpp-agent:${{ steps.vars.outputs.tag }} | |
deploy-release: | |
name: deploy release | |
needs: build | |
runs-on: ubuntu-20.04 | |
if: github.event_name == 'push' && contains(github.ref, 'release/') | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dev image | |
run: make dev-image | |
- name: Prod image | |
run: make prod-image | |
- name: Get tag | |
id: vars | |
run: | | |
echo ::set-output name=tag::$(echo ${GITHUB_REF:19:22}) | |
echo ::group::Env vars | |
echo $(env | sort) | |
echo ::endgroup:: | |
- name: Tag images | |
run: | | |
docker tag dev_vpp_agent ligato/dev-vpp-agent:${{ steps.vars.outputs.tag }} | |
docker tag prod_vpp_agent ligato/vpp-agent:${{ steps.vars.outputs.tag }} | |
- name: Docker Login | |
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | |
- name: Push images | |
run: | | |
docker push ligato/vpp-agent:${{ steps.vars.outputs.tag }} |