Skip to content

Commit

Permalink
Merge pull request #875 from rstudio/merge-versions-job
Browse files Browse the repository at this point in the history
Merge versions job into workbench-session-init job
  • Loading branch information
ianpittwood authored Nov 20, 2024
2 parents 2487ad4 + b04cd5d commit 6808d62
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 37 deletions.
57 changes: 22 additions & 35 deletions .github/workflows/build-bake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,39 +37,6 @@ jobs:
GIT_SHA=$(git rev-parse --short HEAD)
echo "GIT_SHA=$GIT_SHA" >> $GITHUB_OUTPUT
echo "$GIT_SHA"
versions:
name: Fetch Workbench session init container version
runs-on: ubuntu-latest

concurrency:
group: fetch-versions-${{ github.ref }}
cancel-in-progress: true

outputs:
WORKBENCH_SESSION_INIT_VERSION: ${{ steps.get-version.outputs.WORKBENCH_SESSION_INIT_VERSION }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Just
uses: extractions/setup-just@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Python dependencies
run: |
pip install requests
- name: Get Version
id: get-version
run: |
WORKBENCH_SESSION_INIT_VERSION=$(just -f ci.Justfile get-version workbench --type=daily --local)
echo "WORKBENCH_SESSION_INIT_VERSION=$WORKBENCH_SESSION_INIT_VERSION" >> $GITHUB_OUTPUT
base:
needs: [setup]
Expand Down Expand Up @@ -324,7 +291,7 @@ jobs:
snyk-token: '${{ secrets.SNYK_TOKEN }}'

workbench-session-init:
needs: [setup, versions]
needs: [setup]
name: Workbench Session Init
runs-on: ubuntu-latest-8x

Expand All @@ -335,7 +302,6 @@ jobs:
env:
target: workbench-session-init
GIT_SHA: ${{ needs.setup.outputs.GIT_SHA }}
WORKBENCH_SESSION_INIT_VERSION: ${{ needs.versions.outputs.WORKBENCH_SESSION_INIT_VERSION }}

steps:
- name: Checkout
Expand All @@ -354,7 +320,28 @@ jobs:
with:
buildkitd-config: ./share/buildkitd.toml

- name: Set up Just
uses: extractions/setup-just@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Python dependencies
run: |
pip install requests
- name: Get Version
id: get-version
run: |
WORKBENCH_SESSION_INIT_VERSION=$(just -f ci.Justfile get-version workbench --type=daily --local)
echo "WORKBENCH_SESSION_INIT_VERSION=$WORKBENCH_SESSION_INIT_VERSION" >> $GITHUB_OUTPUT
- name: Build, Test, and Push
env:
WORKBENCH_SESSION_INIT_VERSION: ${{ steps.get-version.outputs.WORKBENCH_SESSION_INIT_VERSION }}
uses: ./.github/actions/bake-test-push
with:
target: ${{ env.target }}
Expand Down
3 changes: 1 addition & 2 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ bake target="default":
docker buildx bake --builder=posit-builder -f docker-bake.hcl {{target}}

# just preview-bake workbench-images dev
preview-build:
just preview-bake "default"
alias preview-build := preview-bake
preview-bake target branch="$(git branch --show-current)":
just -f {{justfile()}} create-builder || true
WORKBENCH_DAILY_VERSION=$(just -f ci.Justfile get-version workbench --type=daily --local) \
Expand Down

0 comments on commit 6808d62

Please sign in to comment.