Skip to content

Build and Push Dockerfiles #1

Build and Push Dockerfiles

Build and Push Dockerfiles #1

name: Build and Push Dockerfiles
permissions: read-all
on:
workflow_dispatch:
inputs:
publish_release:
description: Should the license bundle be published to docker-release
type: boolean
required: true
default: false
image_version:
description: Version to associate with the image (default- 'latest')
type: string
required: false
default: 'latest'
env:
PUBLISH_RELEASE: ${{ github.event.inputs.publish_release }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to JFrog
uses: docker/login-action@v1
with:
registry: zowe.jfrog.io
username: ${{ secrets.ARTIFACTORY_USERNAME }}
password: ${{ secrets.ARTIFACTORY_PASSWORD }}
- name: Build and push to snapshot
if: ${{ env.PUBLISH_RELEASE == 'false' }}
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
file: licenses/docker/ort.Dockerfile
tags: zowe-docker-snapshot.jfrog.io/ompzowe/zowecicd-license-base:${{ github.event.inputs.image_version }}
- name: Build and push to release
if: ${{ env.PUBLISH_RELEASE == 'true' }}
id: docker_build

Check failure on line 51 in .github/workflows/create-dockerfiles.yml

View workflow run for this annotation

GitHub Actions / Build and Push Dockerfiles

Invalid workflow file

The workflow is not valid. .github/workflows/create-dockerfiles.yml (Line: 51, Col: 13): The identifier 'docker_build' may not be used more than once within the same scope.
uses: docker/build-push-action@v2
with:
push: true
file: licenses/docker/ort.Dockerfile
tags: zowe-docker-release.jfrog.io/ompzowe/zowecicd-license-base:${{ github.event.inputs.image_version }}