Merge pull request #547 from NethServer/bump-ns-packages #152
Workflow file for this run
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: "Publish builder image" | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'builder/**' | |
permissions: | |
packages: write | |
jobs: | |
publish_images: | |
name: 'Build podman builder image' | |
runs-on: ubuntu-latest | |
env: | |
IMAGETAG: ${{ github.ref_name }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- id: build | |
name: Build podman image | |
run: | | |
# Build the module images | |
cd builder/ | |
bash build-builder | |
- id: publish | |
name: Publish podman image to GH registry | |
run: | | |
# Publish the branch | |
trap 'buildah logout ghcr.io' EXIT | |
buildah login -u ${{ github.actor }} --password-stdin ghcr.io <<<"${{ secrets.GITHUB_TOKEN }}" | |
image='ghcr.io/nethserver/nethsecurity-builder' | |
if [[ "${IMAGETAG}" == "main" ]]; then | |
IMAGETAG=latest | |
fi | |
buildah push $image docker://${image}:${IMAGETAG:-latest} | |
urls="${image}:${IMAGETAG:-latest}"$'\n'"${urls}" | |
echo "::notice title=Image URLs::${urls}" |