chore(main): release buildah-action-runner 1.0.0 #5
Workflow file for this run
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 Buildah Action Runner Image | |
| on: # yamllint disable-line rule:truthy | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - .github/workflows/image-buildah-action-runner.yml | |
| - images/buildah-action-runner/** | |
| tags: | |
| - buildah-action-runner-* | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - .github/workflows/image-buildah-action-runner.yml | |
| - images/buildah-action-runner/** | |
| jobs: | |
| build-buildah-action-runner: | |
| name: Build Buildah Action Runner Image | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - 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('pr-{0}.{1}.{2}.{3}', github.event.number, github.run_id, github.run_number, github.run_attempt) }} | |
| id: version_tag | |
| run: echo "tag=$BRANCH" | sed -e 's/buildah-action-runner-//' >> "$GITHUB_OUTPUT" | |
| - name: Select Image Export Mode | |
| id: image_export | |
| env: | |
| HEAD_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }} | |
| run: | | |
| set -euo pipefail | |
| if [[ "${GITHUB_EVENT_NAME}" == "pull_request" && "${HEAD_REPOSITORY}" != "${GITHUB_REPOSITORY}" ]]; then | |
| echo "load=true" >> "$GITHUB_OUTPUT" | |
| echo "push=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "load=false" >> "$GITHUB_OUTPUT" | |
| echo "push=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Generate Metadata | |
| uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0 | |
| id: metadata | |
| with: | |
| images: ghcr.io/${{ github.repository_owner }}/buildah-action-runner | |
| - name: Build Image | |
| id: build | |
| uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 | |
| with: | |
| context: images/buildah-action-runner | |
| file: images/buildah-action-runner/Containerfile | |
| labels: ${{ steps.metadata.outputs.labels }} | |
| load: ${{ steps.image_export.outputs.load }} | |
| push: ${{ steps.image_export.outputs.push }} | |
| tags: ghcr.io/${{ github.repository_owner }}/buildah-action-runner:${{ steps.version_tag.outputs.tag }} | |
| - name: Smoke Test Image | |
| run: | | |
| docker run --rm ghcr.io/${{ github.repository_owner }}/buildah-action-runner:${{ steps.version_tag.outputs.tag }} bash -lc ' | |
| buildah --version | |
| curl --version | |
| jq --version | |
| node --version | |
| ' |