Skip to content

Commit

Permalink
Stop using actions/checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Sep 26, 2023
1 parent fc797e1 commit 0f65ee9
Showing 1 changed file with 52 additions and 54 deletions.
106 changes: 52 additions & 54 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ jobs:

test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: bahmutov/npm-install@v1
- run: yarn build
- run: npx keycloakify
env:
XDG_CACHE_HOME: "/home/runner/.cache/yarn"
- run: npx build-storybook
- uses: InseeFrLab/onyxia@gh-actions
with:
action_name: checkout
sub_directory: web
- uses: actions/setup-node@v3
- uses: bahmutov/npm-install@v1
- run: yarn build
- run: npx keycloakify
env:
XDG_CACHE_HOME: "/home/runner/.cache/yarn"
- run: npx build-storybook

prepare_release:
needs: test
Expand All @@ -38,7 +38,7 @@ jobs:
release_name: ${{steps._.outputs.release_name}}
release_body: ${{steps._.outputs.release_body}}
release_tag_name: ${{steps._.outputs.release_tag_name}}
target_commitish: ${{steps._.outputs.target_commitish}}
target_commit: ${{steps._.outputs.target_commit}}
steps:
# NOTE: The code for this action is in the gh-actions branch of this repo
- uses: InseeFrLab/onyxia@gh-actions
Expand All @@ -50,13 +50,12 @@ jobs:
runs-on: ubuntu-latest
needs: prepare_release
if: needs.prepare_release.outputs.new_web_docker_image_tags != ''
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v3
with:
ref: ${{needs.prepare_release.outputs.target_commitish}}
- uses: InseeFrLab/onyxia@gh-actions
with:
action_name: checkout
sub_directory: web
sha: ${{needs.prepare_release.outputs.target_commit}}
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
Expand All @@ -73,40 +72,39 @@ jobs:
runs-on: ubuntu-latest
needs: prepare_release
if: needs.prepare_release.outputs.new_chart_version != ''
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v3
with:
ref: ${{needs.prepare_release.outputs.target_commitish}}
- uses: actions/setup-node@v3
- uses: bahmutov/npm-install@v1
- run: yarn build
- run: npx keycloakify
env:
XDG_CACHE_HOME: "/home/runner/.cache/yarn"
KEYCLOAKIFY_THEME_VERSION: ${{needs.prepare_release.outputs.new_chart_version}}
- run: mv build_keycloak/target/*.jar keycloak-theme.jar
- uses: yogeshlonkar/wait-for-jobs@v0
with:
gh-token: ${{github.token}}
ignore-skipped: true
jobs: publish_web_docker_image
ttl: 10
- uses: InseeFrLab/onyxia@gh-actions
with:
action_name: release_helm_chart
sha: ${{needs.prepare_release.outputs.target_commitish}}
- uses: softprops/action-gh-release@v1
with:
name: ${{needs.prepare_release.outputs.release_name}}
body: ${{needs.prepare_release.outputs.release_body}}
tag_name: ${{needs.prepare_release.outputs.release_tag_name}}
target_commitish: ${{needs.prepare_release.outputs.target_commitish}}
generate_release_notes: true
files: |
keycloak-theme.jar
onyxia-${{needs.prepare_release.outputs.new_chart_version}}.tgz
env:
GITHUB_TOKEN: ${{github.token}}
- uses: InseeFrLab/onyxia@gh-actions
with:
action_name: checkout
sub_directory: web
sha: ${{needs.prepare_release.outputs.target_commit}}
- uses: actions/setup-node@v3
- uses: bahmutov/npm-install@v1
- run: yarn build
- run: npx keycloakify
env:
XDG_CACHE_HOME: "/home/runner/.cache/yarn"
KEYCLOAKIFY_THEME_VERSION: ${{needs.prepare_release.outputs.new_chart_version}}
- run: mv build_keycloak/target/*.jar keycloak-theme.jar
- uses: yogeshlonkar/wait-for-jobs@v0
with:
gh-token: ${{github.token}}
ignore-skipped: true
jobs: publish_web_docker_image
ttl: 10
- uses: InseeFrLab/onyxia@gh-actions
with:
action_name: release_helm_chart
sha: ${{needs.prepare_release.outputs.target_commit}}
- uses: softprops/action-gh-release@v1
with:
name: ${{needs.prepare_release.outputs.release_name}}
body: ${{needs.prepare_release.outputs.release_body}}
tag_name: ${{needs.prepare_release.outputs.release_tag_name}}
target_commitish: ${{needs.prepare_release.outputs.target_commit}}
generate_release_notes: true
files: |
keycloak-theme.jar
onyxia-${{needs.prepare_release.outputs.new_chart_version}}.tgz
env:
GITHUB_TOKEN: ${{github.token}}

0 comments on commit 0f65ee9

Please sign in to comment.