Skip to content

Commit

Permalink
Merge pull request #60 from canonical/housekeeping/CI
Browse files Browse the repository at this point in the history
Fixed publish and cleanup workflows
  • Loading branch information
UtkarshBhatthere authored Aug 8, 2024
2 parents 93391b3 + 4a05746 commit 1484afc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish_edge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:

- name: Install deps and clean legacy rules.
run: |
./scripts/deploy-helper.sh install_custom_runner_dependencies
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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish_hotfix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:

- name: Install deps and clean legacy rules.
run: |
./scripts/deploy-helper.sh install_custom_runner_dependencies
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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:

- name: Install deps and clean legacy rules.
run: |
./scripts/deploy-helper.sh install_custom_runner_dependencies
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
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/registry_housekeeping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,16 @@ jobs:
name: GHCR cleanup
runs-on: ubuntu-22.04
steps:
- name: Delete all untagged Hotfixes.
- name: Delete all untagged Hotfixes older than 6 months
uses: snok/container-retention-policy@v2
with:
image-names: hotfix-*
cut-off: one month ago UTC
image-names: ceph
image-tags: hotfix-*
cut-off: 6months
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
with:
image-names: hotfix-*
cut-off: six months ago UTC
timestamp-to-use: updated_at
account-type: org
org-name: canonical
token: ${{ secrets.GITHUB_TOKEN }}
token-type: github-token

0 comments on commit 1484afc

Please sign in to comment.