feat: edit entity page to have ghub and tekton if possible #15
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: Build docker image | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: ['main'] | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
outputs: | |
branch: ${{ steps.extract_branch.outputs.branch }} | |
repository: ${{ steps.extract_repo.outputs.repository }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- name: Extract repo name | |
shell: bash | |
run: echo "repository=${GITHUB_REPOSITORY@L}" >> $GITHUB_OUTPUT | |
id: extract_repo | |
build: | |
runs-on: ubuntu-latest | |
needs: | |
- prepare | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: | | |
ghcr.io/${{ needs.prepare.outputs.repository }}:${{ needs.prepare.outputs.branch }} |