Skip to content

Commit

Permalink
Merge pull request #51 from canonical/fix/releaseJobs
Browse files Browse the repository at this point in the history
Fix LXD dependency in release jobs
  • Loading branch information
UtkarshBhatthere authored Apr 19, 2024
2 parents e43134d + eabfee8 commit ef5f3d3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/publish_edge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3

- name: Setup LXD
uses: canonical/setup-lxd@v0.1.1
with:
channel: 5.20/stable

- name: Install deps and clean legacy rules.
run: |
sudo snap install lxd
sudo snap install rockcraft --classic --edge
sudo lxd init --auto
sudo snap install rockcraft --classic --channel latest/stable
for ipt in iptables iptables-legacy ip6tables ip6tables-legacy; do sudo $ipt --flush; sudo $ipt --flush -t nat; sudo $ipt --delete-chain; sudo $ipt --delete-chain -t nat; sudo $ipt -P FORWARD ACCEPT; sudo $ipt -P INPUT ACCEPT; sudo $ipt -P OUTPUT ACCEPT; done
sudo systemctl reload snap.lxd.daemon
sleep 5
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/publish_hotfix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup LXD
uses: canonical/setup-lxd@v0.1.1
with:
channel: 5.20/stable

- name: Install deps and clean legacy rules.
run: |
sudo snap install lxd
sudo snap install rockcraft --classic --edge
sudo lxd init --auto
sudo snap install rockcraft --classic --channel latest/stable
for ipt in iptables iptables-legacy ip6tables ip6tables-legacy; do sudo $ipt --flush; sudo $ipt --flush -t nat; sudo $ipt --delete-chain; sudo $ipt --delete-chain -t nat; sudo $ipt -P FORWARD ACCEPT; sudo $ipt -P INPUT ACCEPT; sudo $ipt -P OUTPUT ACCEPT; done
sudo systemctl reload snap.lxd.daemon
sleep 5
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/publish_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3

- name: Setup LXD
uses: canonical/setup-lxd@v0.1.1
with:
channel: 5.20/stable

- name: Install deps and clean legacy rules.
run: |
sudo snap install lxd
sudo snap install rockcraft --classic --edge
sudo lxd init --auto
sudo snap install rockcraft --classic --channel latest/stable
for ipt in iptables iptables-legacy ip6tables ip6tables-legacy; do sudo $ipt --flush; sudo $ipt --flush -t nat; sudo $ipt --delete-chain; sudo $ipt --delete-chain -t nat; sudo $ipt -P FORWARD ACCEPT; sudo $ipt -P INPUT ACCEPT; sudo $ipt -P OUTPUT ACCEPT; done
sudo systemctl reload snap.lxd.daemon
sleep 5
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/registry_housekeeping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ jobs:
uses: snok/container-retention-policy@v2
with:
image-names: hotfix-*
cut-off: one day ago UTC
cut-off: one month ago UTC
timestamp-to-use: updated_at
untagged-only: true
account-type: org
org-name: canonical
token: ${{ secrets.GITHUB_TOKEN }}
token-type: github-token

- name: Delete all tagged Hotfixes older than 6 months.
uses: snok/container-retention-policy@v2
Expand All @@ -30,3 +31,4 @@ jobs:
account-type: org
org-name: canonical
token: ${{ secrets.GITHUB_TOKEN }}
token-type: github-token

0 comments on commit ef5f3d3

Please sign in to comment.