🛠️ Bump actions/checkout from 3 to 4 (#773) #2
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 Tutorial Image | ||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
jobs: | ||
build-images: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ROS_DISTRO: [humble, rolling] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
env: | ||
GH_IMAGE: ghcr.io/${{ github.repository }}:${{ matrix.ROS_DISTRO }} | ||
PUSH: ${{ (github.ref_name == 'main') }} | ||
steps: | ||
<<<<<<< HEAD | ||
======= | ||
- name: Checkout distro branch | ||
if: ${{ matrix.ROS_DISTRO != 'rolling' }} | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ matrix.ROS_DISTRO }} | ||
>>>>>>> 51a42b0 (🛠️ Bump actions/checkout from 3 to 4 (#773)) | ||
- name: Set lower case for container name | ||
run: | | ||
echo "GH_IMAGE_LC=${GH_IMAGE,,}" >>${GITHUB_ENV} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to Github Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build Tutorial Image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
file: .docker/Dockerfile | ||
build-args: | | ||
ROS_DISTRO=${{ matrix.ROS_DISTRO }} | ||
BASE_BRANCH=${{ env.BASE_IMAGE_BRANCH }} | ||
target: tutorial_image | ||
push: ${{ env.PUSH }} | ||
no-cache: false | ||
tags: | | ||
${{ env.GH_IMAGE_LC }}-tutorial |