Skip to content

Commit

Permalink
ci: remove deployment configuration from ci (#5628)
Browse files Browse the repository at this point in the history
Simplify the CI workflows by skipping GitHub deployments configuration.
We don't use deployments in any other place at the moment.
  • Loading branch information
ferrarimarco committed May 8, 2024
1 parent 6047e3f commit e0c8376
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 50 deletions.
49 changes: 0 additions & 49 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
cancel-in-progress: true
permissions:
contents: read
deployments: write
issues: write
packages: write
strategy:
Expand Down Expand Up @@ -106,14 +105,6 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Start deployment
uses: bobheadxi/deployments@v1.5.0
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: Production

- name: Build and Push Image
uses: docker/build-push-action@v5
with:
Expand All @@ -133,21 +124,6 @@ jobs:
${{ env.CONTAINER_IMAGE_ID }}
target: "${{ matrix.images.target }}"

- name: Update deployment
uses: bobheadxi/deployments@v1.5.0
# We depend on the 'deployment' step outputs, so we can't run this step
# if the 'deployment' step didn't run. This can happen if any step
# before the 'deployment' step fails. That's why 'always()' is not
# suitable here.
if: steps.deployment.conclusion != 'cancelled' && steps.deployment.conclusion != 'skipped'
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
env: ${{ steps.deployment.outputs.env }}
env_url: https://github.com/super-linter/super-linter

- name: Create Issue on Failure
uses: actions/github-script@v7
if: failure()
Expand All @@ -174,7 +150,6 @@ jobs:
cancel-in-progress: true
permissions:
contents: write
deployments: write
issues: write
packages: write
pull-requests: write
Expand All @@ -187,15 +162,6 @@ jobs:
manifest-file: .github/release-please/.release-please-manifest.json
token: ${{ secrets.GITHUB_TOKEN }}

- name: Start deployment
if: steps.release.outputs.release_created
uses: bobheadxi/deployments@v1.5.0
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: Release

- name: Configure release metedata
if: steps.release.outputs.release_created
# shellcheck disable=SC2062
Expand Down Expand Up @@ -264,21 +230,6 @@ jobs:
git push --force origin ${{ env.SEMVER_MAJOR_VERSION }}
git push --force origin latest
- name: Update deployment
uses: bobheadxi/deployments@v1.5.0
# We depend on the 'deployment' step outputs, so we can't run this step
# if the 'deployment' step didn't run. This can happen if any step
# before the 'deployment' step fails. That's why 'always()' is not
# suitable here.
if: steps.deployment.conclusion != 'cancelled' && steps.deployment.conclusion != 'skipped'
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
env: ${{ steps.deployment.outputs.env }}
env_url: https://github.com/super-linter/super-linter

- name: Create Issue on Failure
uses: actions/github-script@v7
if: failure()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Build and Test
runs-on: ubuntu-latest
permissions:
contents: read
contents: read
concurrency:
# Ref: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
# github.head_ref: head_ref or source branch of the pull request
Expand Down

0 comments on commit e0c8376

Please sign in to comment.