Repository navigation
84 lines (76 loc) · 2.13 KB
/
Copy pathrelease-features.yaml
File metadata and controls
84 lines (76 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: "Release devcontainer features"
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v6
- name: "Publish"
uses: devcontainers/action@v1
with:
publish-features: "true"
generate-docs: "true"
base-path-to-features: "./features/src"
features-namespace: "rails/devcontainer/features"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
plan-images:
needs: deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-24.04
permissions:
contents: read
outputs:
mode: ${{ steps.plan.outputs.mode }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.sha }}
fetch-depth: 0
persist-credentials: false
- uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: plan
id: plan
env:
BEFORE_SHA: ${{ github.event.before }}
AFTER_SHA: ${{ github.sha }}
REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bin/publish-ruby-updates --dry-run
publish-images:
needs: plan-images
if: needs.plan-images.outputs.mode != 'none'
environment: production
runs-on: ubuntu-24.04
permissions:
contents: write
actions: write
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.sha }}
fetch-depth: 0
persist-credentials: false
- uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Dispatch the image workflow
env:
BEFORE_SHA: ${{ github.event.before }}
AFTER_SHA: ${{ github.sha }}
REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bin/publish-ruby-updates