I have the following condition:
name: Build Image
on:
push:
pull_request:
workflow_dispatch:
jobs:
build-image: (This should be only if the tag contains "azure")
name: Build Image Job
runs-on: [ self-hosted ]
steps:
- uses: actions/checkout@v2
- name: Run Build Step
run: |
ANSIBLE_VERSION=$(cat VERSION)
docker images
jobs:
build-image: (This will be for everything else)
name: Build Image Job
runs-on: [ self-hosted ]
steps:
- uses: actions/checkout@v2
- name: Run Build Step
run: |
ANSIBLE_VERSION=$(cat VERSION)
docker images
How can that be achieved? How do you reference the tags inside a job? How do you the variable and make an if rule out of it?