Update dependency GitPython to v3.1.42 #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Rock and Charm | |
on: | |
pull_request: | |
jobs: | |
build-rock: | |
name: Build Rock | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: weiiwang01/rockcraft | |
ref: feat-12f-django | |
path: rockcraft | |
fetch-depth: 0 | |
- name: Get Rockcraft SHA | |
id: rockcraft-sha | |
working-directory: ./rockcraft | |
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
- name: Restore Rockcraft Cache | |
id: restore-rockcraft | |
uses: actions/cache/restore@v4 | |
with: | |
path: ./rockcraft*.snap | |
key: rockcraft-${{ steps.rockcraft-sha.outputs.sha }} | |
- uses: canonical/setup-lxd@v0.1.1 | |
- name: Install Snapcraft | |
if: steps.restore-rockcraft.outputs.cache-hit != 'true' | |
run: sudo snap install snapcraft --classic | |
- name: Build Rockcraft | |
if: steps.restore-rockcraft.outputs.cache-hit != 'true' | |
working-directory: ./rockcraft | |
run: | | |
snapcraft --use-lxd | |
cp rockcraft*.snap ../ | |
- name: Save Rockcraft Cache | |
uses: actions/cache/save@v4 | |
if: steps.restore-rockcraft.outputs.cache-hit != 'true' | |
with: | |
path: ./rockcraft*.snap | |
key: ${{ steps.restore-rockcraft.outputs.cache-primary-key }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: rockcraft-snap | |
path: "rockcraft*.snap" | |
- name: Install Rockcraft | |
run: sudo snap install --dangerous --classic rockcraft*.snap | |
- name: Cleanup | |
run: rm -rf rockcraft* | |
- uses: actions/checkout@v4 | |
- name: Build Rock | |
env: | |
ROCKCRAFT_ENABLE_EXPERIMENTAL_EXTENSIONS: "true" | |
run: rockcraft pack --verbosity trace | |
- name: Print Rockcraft logs | |
if: always() | |
run: "cat ~/.local/state/rockcraft/log/* || :" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: rock | |
path: "*.rock" | |
build-charm: | |
name: Build Charm | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: weiiwang01/charmcraft | |
ref: feat-12f-django | |
path: charmcraft | |
fetch-depth: 0 | |
- name: Get Charmcraft SHA | |
id: charmcraft-sha | |
working-directory: ./charmcraft | |
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
- name: Restore Charmcraft Cache | |
id: restore-charmcraft | |
uses: actions/cache/restore@v4 | |
with: | |
path: ./charmcraft*.snap | |
key: charmcraft-${{ steps.charmcraft-sha.outputs.sha }} | |
- uses: canonical/setup-lxd@v0.1.1 | |
- name: Install Snapcraft | |
if: steps.restore-charmcraft.outputs.cache-hit != 'true' | |
run: sudo snap install snapcraft --classic | |
- name: Build Charmcraft | |
if: steps.restore-charmcraft.outputs.cache-hit != 'true' | |
working-directory: ./charmcraft | |
run: | | |
snapcraft --use-lxd | |
cp charmcraft*.snap ../ | |
- name: Save Charmcraft Cache | |
uses: actions/cache/save@v4 | |
if: steps.restore-charmcraft.outputs.cache-hit != 'true' | |
with: | |
path: ./charmcraft*.snap | |
key: ${{ steps.restore-charmcraft.outputs.cache-primary-key }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: charmcraft-snap | |
path: "charmcraft*.snap" | |
- name: Install Charmcraft | |
run: sudo snap install --dangerous --classic charmcraft*.snap | |
- name: Cleanup | |
run: rm -rf charmcraft* | |
- uses: actions/checkout@v4 | |
- name: Restore Charm Cache | |
id: restore-charm | |
uses: actions/cache/restore@v4 | |
with: | |
path: ./*.charm | |
key: charm-${{ hashFiles('./charm') }} | |
- name: Build Charm | |
env: | |
CHARMCRAFT_ENABLE_EXPERIMENTAL_EXTENSIONS: "true" | |
if: steps.restore-charm.outputs.cache-hit != 'true' || steps.restore-charmcraft.outputs.cache-hit != 'true' | |
working-directory: ./charm | |
run: | | |
charmcraft pack --verbosity trace | |
cp *.charm ../ | |
- name: Print Charmcraft logs | |
if: always() | |
run: "cat ~/.local/state/charmcraft/log/* || :" | |
- name: Save Charm Cache | |
uses: actions/cache/save@v4 | |
if: steps.restore-charm.outputs.cache-hit != 'true' || steps.restore-charmcraft.outputs.cache-hit != 'true' | |
with: | |
path: ./*.charm | |
key: ${{ steps.restore-charm.outputs.cache-primary-key }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: charm | |
path: "*.charm" |