diff --git a/.github/workflows/build-images-action.yml b/.github/workflows/build-images-action.yml index e3b86a6e..1aeeb0af 100644 --- a/.github/workflows/build-images-action.yml +++ b/.github/workflows/build-images-action.yml @@ -1,28 +1,34 @@ name: build-images-action + on: push: branches: - - 'main' - - 'release-*' + - 'main' + - 'release-*' + tags: + - 'v*' + permissions: {} + jobs: build: name: Build container images runs-on: ubuntu-latest - if: github.repository == 'metal3-io/ip-address-manager' + permissions: contents: read + + if: github.repository == 'metal3-io/ip-address-manager' steps: - - name: build ipam image - uses: toptal/jenkins-job-trigger-action@137fff703dd260b52b53d3ba1960396415abc568 # 1.0.2 - with: - jenkins_url: "https://jenkins.nordix.org/" - jenkins_user: "metal3.bot@gmail.com" - jenkins_token: ${{ secrets.JENKINS_TOKEN }} - job_name: "metal3_ip-address-manager_container_image_building" - job_params: | - { - "BUILD_CONTAINER_IMAGE_NAME": "ip-address-manager", - "BUILD_CONTAINER_IMAGE_BRANCH": "${{ github.ref }}" - } - job_timeout: "1000" + - name: build ipam image + uses: toptal/jenkins-job-trigger-action@137fff703dd260b52b53d3ba1960396415abc568 # 1.0.2 + with: + jenkins_url: "https://jenkins.nordix.org/" + jenkins_user: "metal3.bot@gmail.com" + jenkins_token: ${{ secrets.JENKINS_TOKEN }} + job_name: "metal3_ip-address-manager_container_image_building" + job_params: | + { + "BUILD_CONTAINER_IMAGE_GIT_REFERENCE": "${{ github.ref }}" + } + job_timeout: "1000"