Bump actions/checkout from 3 to 4 #5
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: Build Container Image | |
on: | |
pull_request: | |
branches: [ main ] | |
workflow_call: | |
inputs: | |
tagTypes: | |
required: false | |
type: string | |
default: | | |
type=sha | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
name: Build and Publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
${{ env.REGISTRY }}/${{ github.repository }} | |
# when opened on pull request, no inputs are provided. when empty the | |
# defaults are used which produces pr-* as the tag to the image using | |
# the below information. | |
# type=schedule,pattern=nightly,enable=true,priority=1000 | |
# type=ref,event=branch,enable=true,priority=600 | |
# type=ref,event=tag,enable=true,priority=600 | |
# type=ref,event=pr,prefix=pr-,enable=true,priority=600 | |
tags: | | |
${{ inputs.tagTypes }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push Docker images | |
uses: docker/build-push-action@v3.1.1 | |
with: | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |