name: release on: release: types: [published] permissions: contents: read packages: write id-token: write defaults: run: shell: bash jobs: release: runs-on: ubuntu-latest steps: - name: Clone the code uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0 - name: Setup Go uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 #v6.5.0 with: go-version-file: go.mod cache: false - name: Set up Docker uses: docker/setup-docker-action@6d7cfa65f60a9dda7b46e5513fa982536f3c9877 #v5.3.0 with: daemon-config: | { "features": { "containerd-snapshotter": true } } - name: Set up Docker Buildx uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c #v4.2.0 with: driver: docker - name: Login to GitHub Container Registry uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 #v4.4.0 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push image run: | IMG_REF=$(make build-image-multiarch IMG_REPOSITORY=${{ github.repository_owner }}/netbird-operator IMG_TAG=${{ github.event.release.tag_name }}) || exit 1 docker push ${IMG_REF} - name: Build and push Helm chart run: | HELM_VERSION="${{ github.event.release.tag_name }}" HELM_VERSION="${HELM_VERSION#v}" helm package --app-version ${{ github.event.release.tag_name }} --version ${HELM_VERSION} charts/netbird-operator helm push netbird-operator-${HELM_VERSION}.tgz oci://ghcr.io/${{ github.repository_owner }}/helm-charts