chore(main): release kairos-ubuntu 0.3.0 #227
This file contains hidden or 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: Build Kairos-Ubuntu | |
| on: # yamllint disable-line rule:truthy | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - .github/workflows/image-kairos-ubuntu.yml | |
| - images/kairos-ubuntu/** | |
| tags: | |
| - kairos-ubuntu-* | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - .github/workflows/image-kairos-ubuntu.yml | |
| - images/kairos-ubuntu/** | |
| jobs: | |
| build-container: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| # Note: this must start with a number for the build to work correctly! | |
| - name: Compute Version Tag | |
| env: | |
| BRANCH: ${{ github.ref_type == 'tag' && github.ref_name || github.event_name != 'pull_request' && format('{0}.{1}.{2}', github.run_id, github.run_number, github.run_attempt) || format('{0}-pr', github.event.number) }} | |
| id: version_tag | |
| run: echo "tag=$BRANCH" | sed -e 's/kairos-ubuntu-//' >> "$GITHUB_OUTPUT" | |
| - name: Generate Metadata | |
| uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 | |
| id: metadata | |
| with: | |
| images: ghcr.io/${{ github.repository_owner }}/kairos-ubuntu | |
| - name: Build Image | |
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 | |
| with: | |
| build-args: | | |
| VERSION=${{ steps.version_tag.outputs.tag }} | |
| context: images/kairos-ubuntu | |
| labels: ${{ steps.metadata.outputs.labels }} | |
| push: ${{ github.ref_type == 'tag' }} | |
| tags: ghcr.io/${{ github.repository_owner }}/kairos-ubuntu:${{ steps.version_tag.outputs.tag }} |