Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@ on:
# Hourly rebuild of dev images
- cron: "45 4 * * *" # At 04:45 every day

pull_request:

push:
branches:
- main


concurrency:
# Only cancel in-progress runs for pull_request events, this prevents cancelling workflows against main or tags
# A pull_request will reuse the same group thus enabling cancelation, all others receive a unique run_id
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

Expand All @@ -37,12 +34,13 @@ jobs:
if: always()

runs-on: ubuntu-latest
permissions: {}
timeout-minutes: 10
needs:
- dev

steps:
- uses: re-actors/alls-green@release/v1
- uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
id: alls-green
with:
jobs: ${{ toJSON(needs) }}
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,32 @@ on:
types:
- opened

permissions: {}

jobs:
issue:
# only run in posit-dev/images-workbench.
if: github.repository == 'posit-dev/images-workbench'
runs-on: ubuntu-latest
permissions: {}
steps:

- name: GitHub App Token
uses: actions/create-github-app-token@v3
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
id: app-token
with:
app-id: ${{ secrets.WORKBENCH_IDE_RELEASE_APP_ID }}
private-key: ${{ secrets.WORKBENCH_IDE_RELEASE_PEM }}

- name: Add to Platform Carbon Project
uses: actions/add-to-project@v1.0.2
uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2
with:
github-token: ${{ steps.app-token.outputs.token }}
project-url: https://github.com/orgs/posit-dev/projects/17

- name: Add Default Labels
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ steps.app-token.outputs.token }}
labels: |
docker
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
GH_REPO: ${{ github.repository }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
run: gh issue edit "$ISSUE_NUMBER" --add-label "docker"
66 changes: 66 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Pull Request
on:
pull_request:


concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:
ci:
name: CI
if: always()
runs-on: ubuntu-latest
permissions: {}
timeout-minutes: 10
needs:
- production
- development
- session
- zizmor
steps:
- uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}

production:
name: Production
permissions:
contents: read
packages: write
uses: posit-dev/images-shared/.github/workflows/bakery-build-pr.yml@main
with:
dev-versions: "exclude"
matrix-versions: "exclude"

development:
name: Development
permissions:
contents: read
packages: write
uses: posit-dev/images-shared/.github/workflows/bakery-build-pr.yml@main
with:
dev-versions: "only"
matrix-versions: "exclude"

session:
name: Session
permissions:
contents: read
packages: write
uses: posit-dev/images-shared/.github/workflows/bakery-build-pr.yml@main
with:
matrix-versions: "only"

zizmor:
name: Zizmor
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
8 changes: 3 additions & 5 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@ on:
# Weekly rebuild of all images, to pick up any upstream changes.
- cron: "15 3 * * 0" # At 03:15 on Sunday

pull_request:

push:
branches:
- main


concurrency:
# Only cancel in-progress runs for pull_request events, this prevents cancelling workflows against main or tags
# A pull_request will reuse the same group thus enabling cancelation, all others receive a unique run_id
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

Expand All @@ -28,13 +25,14 @@ jobs:
if: always()

runs-on: ubuntu-latest
permissions: {}
timeout-minutes: 10
needs:
- lint
- build

steps:
- uses: re-actors/alls-green@release/v1
- uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
id: alls-green
with:
jobs: ${{ toJSON(needs) }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ on:
required: true
type: string


jobs:
release:
if: github.event_name == 'workflow_dispatch'
timeout-minutes: 10
permissions:
contents: write
pull-requests: write
uses: posit-dev/images-shared/.github/workflows/product-release.yml@main
with:
version: ${{ inputs.version }}
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/session.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@ on:
# Weekly rebuild of all images, to pick up any upstream changes.
- cron: "15 4 * * 0" # At 04:15 on Sunday

pull_request:

push:
branches:
- main


concurrency:
# Only cancel in-progress runs for pull_request events, this prevents cancelling workflows against main or tags
# A pull_request will reuse the same group thus enabling cancelation, all others receive a unique run_id
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

Expand All @@ -23,11 +20,12 @@ jobs:
name: CI
if: always()
runs-on: ubuntu-latest
permissions: {}
timeout-minutes: 10
needs:
- build
steps:
- uses: re-actors/alls-green@release/v1
- uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
id: alls-green
with:
jobs: ${{ toJSON(needs) }}
Expand All @@ -46,7 +44,7 @@ jobs:
# Builds all versions of each image in parallel.
#
# Run on merges to main, or on weekly scheduled re-builds.
if: contains(fromJSON('["push", "pull_request"]'), github.event_name) || github.event.schedule == '15 3 * * 0'
if: github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
permissions:
contents: read
packages: write
Expand Down
9 changes: 9 additions & 0 deletions .github/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
rules:
unpinned-uses:
config:
policies:
# Shared workflows and composite actions from images-shared
# are kept at @main intentionally.
"posit-dev/images-shared/*": ref-pin
"*": hash-pin