Skip to content

Merge pull request #62 from xtrusia/adding-saml2 #46

Merge pull request #62 from xtrusia/adding-saml2

Merge pull request #62 from xtrusia/adding-saml2 #46

Workflow file for this run

name: Release Ceph Rocks Edge
# Runs whenever a new commit is pushed to below mentioned branches.
on:
push:
branches:
- 'stable/*'
- 'main'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
release_to_registry:
name: Release Ceph Rocks Edge to GHCR
runs-on: ubuntu-22.04
permissions:
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Setup LXD
uses: canonical/[email protected]
with:
channel: 5.21/edge
- name: Install deps and clean legacy rules.
run: |
sudo snap install docker
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
- name: Patch version information into rock recipe
id: versioning
run: |
PKG_VER_STR=$(sudo rockcraft pull pkg_info -v &> >(grep "Version"))
PKG_VER=$(cut -d' ' -f3 <<< $PKG_VER_STR)
CEPH_VER=$(cut -d'-' -f1 <<< $PKG_VER)
sed -i "/version/c\version: $CEPH_VER" rockcraft.yaml
echo "::set-output name=ceph_version::$CEPH_VER"
- name: login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ghcr.io/canonical/ceph
tags: |
type=raw,value=quincy-edge,enable=${{ startsWith(steps.versioning.outputs.ceph_version, '17') }}
type=raw,value=reef-edge,enable=${{ startsWith(steps.versioning.outputs.ceph_version, '18') }}
type=raw,value=dev-edge,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
- name: Prepare Rock
run: ./scripts/test-helper.sh build_rock
- name: Load to Docker daemon
run: ./scripts/test-helper.sh load_to_docker $TAGS
env:
TAGS: ${{ steps.meta.outputs.tags }}