Dev #7
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 charm | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
- dev | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: | |
- linux/amd64 | |
# - linux/arm/v7 | |
# - linux/arm/v8 | |
# - linux/arm64 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Init LXD | |
run: | | |
set -euxo pipefail | |
sudo lxd init --auto | |
# This is a throw-away CI environment, do not do this at home | |
sudo chmod 666 /var/snap/lxd/common/lxd/unix.socket | |
# Fixup iptables forwarding issues from LXD containers with a flush and | |
# re-create of rules. | |
sudo iptables -F FORWARD | |
sudo iptables -P FORWARD ACCEPT | |
- name: Install charmcraft snap | |
run: | | |
sudo snap install charmcraft --classic --channel=2.x/stable | |
- name: Build charm with charmcraft | |
run: | | |
charmcraft pack --verbose | |
- name: Upload Charm | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ansible-charm | |
path: | | |
ansible_ubuntu-*.charm | |
retention-days: 5 |