Skip to content

Merge pull request #329 from stackhpc/slack-notifications #20

Merge pull request #329 from stackhpc/slack-notifications

Merge pull request #329 from stackhpc/slack-notifications #20

---
name: Publish container repositories
on:
push:
branches: [main]
paths:
- '.github/workflows/container-publish.yml'
- 'ansible/dev-pulp-container-publish.yml'
- 'ansible/inventory/group_vars/all/dev-pulp-containers'
- 'ansible/inventory/group_vars/all/kolla'
workflow_dispatch:
inputs:
filter:
description: Space-separated list of regular expressions matching images to publish
type: string
required: false
default: ""
distros:
description: Space-separated list of base distributions to publish
type: string
required: false
default: ""
env:
ANSIBLE_FORCE_COLOR: True
ANSIBLE_VAULT_PASSWORD_FILE: ${{ github.workspace }}/vault-pass
jobs:
container-publish:
name: Publish container repositories
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Release Train & dependencies
uses: ./.github/actions/setup
with:
vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }}
vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }}
- name: Publish container repositories
run: |
ansible-playbook -i ansible/inventory \
ansible/dev-pulp-container-publish.yml \
-e kolla_container_image_filter="'$FILTER'" \
-e kolla_base_distros_override="'$DISTROS'"
env:
FILTER: ${{ github.event.inputs.filter }}
DISTROS: ${{ github.event.inputs.distros }}
- name: Send message to Slack via Workflow Builder
uses: ./.github/actions/slack-alert
with:
inputs: >-
filter: ${{ inputs.filter }}\n
distros: ${{ inputs.distros }}\n
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }}
if: failure() && github.event_name == 'push'