Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Aug 8, 2024
1 parent e9fe18a commit 1b59a18
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 64 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/ci-cd-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,42 +32,12 @@ env:
CI_ARTIFACTS_RUN_NUMBER: 329 # ${{ github.event.inputs.ci_artifacts_run_number || github.run_number }}

jobs:
test:
runs-on: ubuntu-24.04
environment: deploy
permissions:
id-token: write
steps:
- uses: actions/checkout@v4

- uses: actions/github-script@v7
id: get-id-token
# if: github.ref == 'refs/heads/main'
with:
script: |
const fs = require('fs');
const token = await core.getIDToken('backend.fullstaqruby.org');
fs.writeFileSync(
process.env.GITHUB_OUTPUT,
`id_token<<EOF\n${token}\nEOF\n`,
{ flag: 'a' }
);
- name: Restart web server
run: ./internal-scripts/ci-cd/publish/restart-web-server.rb
# if: github.ref == 'refs/heads/main'
env:
ID_TOKEN: ${{ steps.get-id-token.outputs.id_token }}

- run: 'false'

# Determines which jobs should be run, or (in case this is a re-run)
# which jobs can be skipped this time because the last run succeeded.
# We determine this by checking whether the artifacts produced by jobs
# exist in this run.
determine_necessary_jobs:
name: Determine necessary jobs
needs: test
runs-on: ubuntu-24.04
environment: test
permissions:
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/ci-cd-main.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,42 +22,12 @@ env:
CI_ARTIFACTS_RUN_NUMBER: 329 # ${{ github.event.inputs.ci_artifacts_run_number || github.run_number }}

jobs:
test:
runs-on: ubuntu-24.04
environment: deploy
permissions:
id-token: write
steps:
- uses: actions/checkout@v4

- uses: actions/github-script@v7
id: get-id-token
# if: github.ref == 'refs/heads/main'
with:
script: |
const fs = require('fs');
const token = await core.getIDToken('backend.fullstaqruby.org');
fs.writeFileSync(
process.env.GITHUB_OUTPUT,
`id_token<<EOF\n${token}\nEOF\n`,
{ flag: 'a' }
);

- name: Restart web server
run: ./internal-scripts/ci-cd/publish/restart-web-server.rb
# if: github.ref == 'refs/heads/main'
env:
ID_TOKEN: ${{ steps.get-id-token.outputs.id_token }}

- run: 'false'

# Determines which jobs should be run, or (in case this is a re-run)
# which jobs can be skipped this time because the last run succeeded.
# We determine this by checking whether the artifacts produced by jobs
# exist in this run.
determine_necessary_jobs:
name: Determine necessary jobs
needs: test
runs-on: ubuntu-24.04
environment: test
permissions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-cd-publish-test-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:

- uses: actions/github-script@v7
id: get-id-token
# if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main'
with:
script: |
const fs = require('fs');
Expand All @@ -125,7 +125,7 @@ jobs:
- name: Restart web server
run: ./internal-scripts/ci-cd/publish/restart-web-server.rb
# if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main'
env:
ID_TOKEN: ${{ steps.get-id-token.outputs.id_token }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-cd-publish-test-production.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:

- uses: actions/github-script@v7
id: get-id-token
# if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main'
with:
script: |
const fs = require('fs');
Expand All @@ -115,7 +115,7 @@ jobs:

- name: Restart web server
run: ./internal-scripts/ci-cd/publish/restart-web-server.rb
# if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main'
env:
ID_TOKEN: ${{ steps.get-id-token.outputs.id_token }}

Expand Down

0 comments on commit 1b59a18

Please sign in to comment.