Skip to content

Commit

Permalink
update publish charm charm_working_directory -> charm_directory
Browse files Browse the repository at this point in the history
  • Loading branch information
javierdelapuente committed Apr 8, 2024
1 parent 6548937 commit 1307719
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/publish_charm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
OWNER: ${{ github.repository_owner }}
REGISTRY: ghcr.io
channel: latest/edge
charm_working_directory: "./charm"
charm_directory: "charm"
charmcraft_ref: feat-12f-django
charmcraft_repository: weiiwang01/charmcraft
paas_app_charmer_oci_name: django-app-image
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ${{ env.charm_working_directory || env.working_directory }}
working-directory: ${{ env.working_directory }}/${{ env.charm_directory }}
steps:
- uses: actions/[email protected]
- name: Search for docs folder
Expand All @@ -58,11 +58,11 @@ jobs:
discourse_api_key: ${{ secrets.DISCOURSE_API_KEY }}
dry_run: true
github_token: ${{ secrets.GITHUB_TOKEN }}
charm_dir: ${{ env.charm_working_directory || env.working_directory }}
charm_dir: ${{ env.working_directory }}/${{ env.charm_directory }}
vars:
runs-on: ubuntu-22.04
outputs:
charm_working_directory: ${{ env.charm_working_directory || env.working_directory }}
charm_working_directory: ${{ env.working_directory }}/${{ env.charm_directory }}
channel: ${{ env.channel }}
steps:
- run: echo "Exposing env vars"
Expand All @@ -79,11 +79,11 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- if: env.charm_working_directory != ''
- if: ${{ env.working_directory }}/${{ env.charm_directory }} != './/.'
name: Change directory
run: |
TEMP_DIR=$(mktemp -d)
cp -rp ./${{env.charm_working_directory}}/. $TEMP_DIR
cp -rp ./${{ env.working_directory }}/${{ env.charm_directory }}/. $TEMP_DIR
rm -rf .* * || :
cp -rp $TEMP_DIR/. .
rm -rf $TEMP_DIR
Expand Down Expand Up @@ -233,11 +233,11 @@ jobs:
sudo snap install charmcraft --classic --channel ${{ env.charmcraft_channel }}
- uses: actions/[email protected]
- if: env.charm_working_directory != ''
- if: ${{ env.working_directory }}/${{ env.charm_directory }} != './/.'
name: Change directory
run: |
TEMP_DIR=$(mktemp -d)
cp -rp ./${{env.charm_working_directory}}/. $TEMP_DIR
cp -rp ./${{ env.working_directory }}/${{ env.charm_directory }}/. $TEMP_DIR
rm -rf .* * || :
cp -rp $TEMP_DIR/. .
rm -rf $TEMP_DIR
Expand Down Expand Up @@ -369,13 +369,13 @@ jobs:
sudo snap install charmcraft --classic --channel ${{ env.charmcraft_channel }}
- uses: actions/[email protected]
- if: env.charm_working_directory != ''
- if: ${{ env.working_directory }}/${{ env.charm_directory }} != './/.'
name: Change directory
run: |
set -x
ls
TEMP_DIR=$(mktemp -d)
cp -rp ./${{env.charm_working_directory}}/. $TEMP_DIR
cp -rp ./${{ env.working_directory }}/${{ env.charm_directory }}/. $TEMP_DIR
rm -rf .* * || :
cp -rp $TEMP_DIR/. .
rm -rf $TEMP_DIR
Expand Down

0 comments on commit 1307719

Please sign in to comment.