Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

add name to job and remove debug echo #6

add name to job and remove debug echo

add name to job and remove debug echo #6

Workflow file for this run

name: Pack and Deploy
on:
push:
branches:
- main
- staging
# to be deleted after testing
- charm-jaas
workflow_dispatch:
inputs:
environment:
description: 'Environment (Production or Staging)'
required: true
type: choice
options:
- Production
- Staging
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.set_env.outputs.environment }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Determine environment
id: set_env
run: |
if [[ -n "${{ github.event.inputs.environment }}" ]]; then
echo "environment=${{ github.event.inputs.environment }}" >> "$GITHUB_OUTPUT"
elif [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then
echo "environment=Production" >> "$GITHUB_OUTPUT"
else
echo "environment=Staging" >> "$GITHUB_OUTPUT"
fi
deploy:
needs: setup
name: Deploy
uses: canonical/webteam-devops/.github/workflows/deploy.yaml@refactor-deploy-github-action
with:
charm_name: ${{ vars.CHARM_NAME }}
channel: ${{ vars.CHANNEL }}
juju_controller_name: ${{ vars.JUJU_CONTROLLER_NAME }}
juju_model_name: ${{ vars.JUJU_MODEL_NAME }}
environment: ${{ needs.setup.outputs.environment }}
environmentUrl: ${{ vars.ENVIRONMENT_URL }}
secrets:
VAULT_APPROLE_ROLE_ID: ${{ secrets.VAULT_APPROLE_ROLE_ID }}
VAULT_APPROLE_SECRET_ID: ${{ secrets.VAULT_APPROLE_SECRET_ID }}
CHARMHUB_TOKEN: ${{ secrets.CHARMHUB_TOKEN }}