Skip to content

Commit

Permalink
Simplify usage of ARCH and INSTALL_TO_CHROOT
Browse files Browse the repository at this point in the history
These variables are just retrieved from inputs, not vars.
  • Loading branch information
rhaschke committed Feb 23, 2025
1 parent 9da438a commit 2444b69
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/interactive.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: interactive
run-name: "interactive: ${{ inputs.DEB_DISTRO || vars.DEB_DISTRO }}-${{ inputs.ROS_DISTRO || vars.ROS_DISTRO || 'one'}}-${{ inputs.ARCH || vars.ARCH || 'x64' }} ${{ inputs.ROS_SOURCES || vars.ROS_SOURCES }}"
run-name: "interactive: ${{ inputs.DEB_DISTRO || vars.DEB_DISTRO }}-${{ inputs.ROS_DISTRO || vars.ROS_DISTRO || 'one'}}-${{ inputs.ARCH }} ${{ inputs.ROS_SOURCES || vars.ROS_SOURCES }}"

on:
workflow_dispatch:
Expand Down Expand Up @@ -48,18 +48,19 @@ on:
SKIP_EXISTING:
type: boolean
description: Skip already built packages?
required: false
required: true
default: true
CONTINUE_ON_ERROR:
type: boolean
description: Continue on build errors?
required: false
required: true
default: true
# Installing built packages to chroot speeds up downstream builds?
INSTALL_TO_CHROOT:
type: boolean
description: Incrementally fill chroot?
required: false
required: true
default: false
DEPLOY:
type: boolean
description: Deploy to reprepro server?
Expand All @@ -77,7 +78,7 @@ jobs:
with:
DEB_DISTRO: ${{ inputs.DEB_DISTRO || vars.DEB_DISTRO }}
ROS_DISTRO: ${{ inputs.ROS_DISTRO || vars.ROS_DISTRO || 'one' }}
ARCH: ${{ inputs.ARCH || vars.ARCH || 'x64' }}
ARCH: ${{ inputs.ARCH }}
ROS_SOURCES: ${{ inputs.ROS_SOURCES || vars.ROS_SOURCES }}
INSTALL_GPG_KEYS: |
sudo curl -sSL https://ros.packages.techfak.net/gpg.key -o /etc/apt/keyrings/ros-one-keyring.gpg
Expand All @@ -92,7 +93,7 @@ jobs:
DEBS_ARTIFACT_NAME: ${{ inputs.DEB_DISTRO || vars.DEB_DISTRO }}-debs
SKIP_EXISTING: ${{ inputs.SKIP_EXISTING }}
CONTINUE_ON_ERROR: ${{ inputs.CONTINUE_ON_ERROR }}
INSTALL_TO_CHROOT: ${{ inputs.INSTALL_TO_CHROOT || vars.INSTALL_TO_CHROOT || false }}
INSTALL_TO_CHROOT: ${{ inputs.INSTALL_TO_CHROOT }}

stage-2:
needs: stage-1
Expand All @@ -101,7 +102,7 @@ jobs:
with:
DEB_DISTRO: ${{ inputs.DEB_DISTRO || vars.DEB_DISTRO }}
ROS_DISTRO: ${{ inputs.ROS_DISTRO || vars.ROS_DISTRO || 'one' }}
ARCH: ${{ inputs.ARCH || vars.ARCH || 'x64' }}
ARCH: ${{ inputs.ARCH }}
ROS_SOURCES: ${{ inputs.ROS_SOURCES || vars.ROS_SOURCES }}
INSTALL_GPG_KEYS: |
sudo curl -sSL https://ros.packages.techfak.net/gpg.key -o /etc/apt/keyrings/ros-one-keyring.gpg
Expand All @@ -116,7 +117,7 @@ jobs:
DEBS_ARTIFACT_NAME: ${{ inputs.DEB_DISTRO || vars.DEB_DISTRO }}-debs
SKIP_EXISTING: ${{ inputs.SKIP_EXISTING }}
CONTINUE_ON_ERROR: ${{ inputs.CONTINUE_ON_ERROR }}
INSTALL_TO_CHROOT: ${{ inputs.INSTALL_TO_CHROOT || vars.INSTALL_TO_CHROOT || false }}
INSTALL_TO_CHROOT: ${{ inputs.INSTALL_TO_CHROOT }}

stage-3:
needs: stage-2
Expand All @@ -125,7 +126,7 @@ jobs:
with:
DEB_DISTRO: ${{ inputs.DEB_DISTRO || vars.DEB_DISTRO }}
ROS_DISTRO: ${{ inputs.ROS_DISTRO || vars.ROS_DISTRO || 'one' }}
ARCH: ${{ inputs.ARCH || vars.ARCH || 'x64' }}
ARCH: ${{ inputs.ARCH }}
ROS_SOURCES: ${{ inputs.ROS_SOURCES || vars.ROS_SOURCES }}
INSTALL_GPG_KEYS: |
sudo curl -sSL https://ros.packages.techfak.net/gpg.key -o /etc/apt/keyrings/ros-one-keyring.gpg
Expand All @@ -140,16 +141,16 @@ jobs:
DEBS_ARTIFACT_NAME: ${{ inputs.DEB_DISTRO || vars.DEB_DISTRO }}-debs
SKIP_EXISTING: ${{ inputs.SKIP_EXISTING }}
CONTINUE_ON_ERROR: ${{ inputs.CONTINUE_ON_ERROR }}
INSTALL_TO_CHROOT: ${{ inputs.INSTALL_TO_CHROOT || vars.INSTALL_TO_CHROOT || false }}
INSTALL_TO_CHROOT: ${{ inputs.INSTALL_TO_CHROOT }}

deploy:
needs: [stage-1, stage-2, stage-3]
if: ${{ !cancelled() && vars.DEPLOY_URL }}
if: ${{ !cancelled() && inputs.DEPLOY && vars.DEPLOY_URL }}
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Import build artifacts to reprepro server
uses: ./reprepro
with:
url: "${{ vars.DEPLOY_URL }}?distro=${{ inputs.DEB_DISTRO || vars.DEB_DISTRO }}&run_id=${{ github.run_id }}&arch=${{ inputs.ARCH || vars.ARCH || 'x64' }}"
url: "${{ vars.DEPLOY_URL }}?distro=${{ inputs.DEB_DISTRO || vars.DEB_DISTRO }}&run_id=${{ github.run_id }}&arch=${{ inputs.ARCH }}"

0 comments on commit 2444b69

Please sign in to comment.