Moveit generic (#207) #456
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: test-image | |
on: | |
push: | |
branches: [main, humble, jazzy] | |
paths: | |
- 'deb_requirements.txt' | |
- '.github/workflows/Dockerfile' | |
- '.devcontainer/Dockerfile' | |
- '**/package.xml' | |
pull_request: | |
branches: [main, humble, jazzy] | |
paths: | |
- 'deb_requirements.txt' | |
- '.github/workflows/Dockerfile' | |
- '.devcontainer/Dockerfile' | |
- '**/package.xml' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: read-all | |
jobs: | |
build-and-push: | |
runs-on: intellabs-01 | |
permissions: | |
packages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d #v3.0.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 #v3.0.0 | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> "$GITHUB_OUTPUT" | |
id: extract_branch | |
- name: Build and push Docker image | |
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 #v5.0.0 | |
with: | |
context: . | |
file: .github/workflows/Dockerfile | |
push: true | |
tags: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref || steps.extract_branch.outputs.branch }} | |
build-args: | | |
ROS_DISTRO=${{ github.ref == 'refs/heads/main' && 'humble' || github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }} | |
test-devcontainer: | |
runs-on: intellabs-01 | |
permissions: | |
packages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 #v3.0.0 | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> "$GITHUB_OUTPUT" | |
id: extract_branch | |
- name: Build Docker image | |
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 #v5.0.0 | |
with: | |
context: . | |
file: .devcontainer/Dockerfile | |
push: false | |
build-args: | | |
ROS_DISTRO=${{ github.ref == 'refs/heads/main' && 'humble' || github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }} |