Skip to content

Commit

Permalink
refactor: use new configuration variables (#712)
Browse files Browse the repository at this point in the history
* refactor: update secret reference in cleanup-registry.yml

* refactor: update references in continuous-delivery.yml and publish-image.yml

* refactor: add explicit SENTRY_ORG to release action

* refactor: update lint ignore
  • Loading branch information
guidojw authored Mar 9, 2023
1 parent e04f6e9 commit 8003885
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cleanup-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
account-type: org
org-name: ${{ github.repository_owner }}
skip-tags: latest,staging
token: ${{ secrets.PAT }}
token: ${{ secrets.GH_PAT }}
7 changes: 3 additions & 4 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ concurrency:

env:
PROJECT_NAME: amber-ui
SENTRY_ORG: csvalpha
APP_ID: 152333

jobs:
branch_check:
Expand Down Expand Up @@ -166,6 +164,7 @@ jobs:
uses: getsentry/action-release@586b62368d564f25d694ce05fcb9cf53de65ac4f # v1.3.1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ vars.SENTRY_ORG_NAME }}
SENTRY_PROJECT: ${{ env.PROJECT_NAME }}
with:
environment: ${{ needs.metadata.outputs.stage }}
Expand Down Expand Up @@ -212,8 +211,8 @@ jobs:
- name: Update Continuous Delivery check run
uses: guidojw/actions/update-check-run@abb0ee8d1336edf73383f2e5a09abd3a22f25b13 # v1.3.3
with:
app_id: ${{ env.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
app_id: ${{ vars.GH_APP_ID }}
private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}
sha: ${{ needs.merge.outputs.sha }}
name: Continuous Delivery
conclusion: ${{ steps.get_conclusion.outputs.conclusion }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Lint
run: |
EXIT_STATUS=0
./actionlint -ignore 'property "app_private_key" is not defined' -ignore 'SC2153:' \
./actionlint -ignore 'property "gh_app_private_key" is not defined' -ignore 'SC2153:' \
-ignore 'property "sha" is not defined in object type {}' || EXIT_STATUS=$?
docker run app yarn lint:hbs || EXIT_STATUS=$?
docker run app yarn lint:js || EXIT_STATUS=$?
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/publish-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ on:

env:
PROJECT_NAME: amber-ui
REGISTRY_URL: ghcr.io
SENTRY_ORG: csvalpha
APP_ID: 152333

jobs:
metadata:
Expand Down Expand Up @@ -48,7 +45,7 @@ jobs:
{
echo 'build_args<<EOF'
echo "$BUILD_ARGS"
echo 'EOF'
echo 'EOF'
} >> "$GITHUB_OUTPUT"
fi
Expand All @@ -69,7 +66,7 @@ jobs:
- name: Login to GitHub Container Registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # tag=v2.1.0
with:
registry: ${{ env.REGISTRY_URL }}
registry: ${{ vars.DOCKER_REGISTRY_URL }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -83,7 +80,7 @@ jobs:
cache-from: type=gha,scope=main
cache-to: type=gha,mode=max,scope=main
tags: |
${{ env.REGISTRY_URL }}/${{ github.repository_owner }}/${{ env.PROJECT_NAME }}:${{
${{ vars.DOCKER_REGISTRY_URL }}/${{ github.repository_owner }}/${{ env.PROJECT_NAME }}:${{
needs.metadata.outputs.tag }}
- name: Get sourcemaps from image
Expand All @@ -98,6 +95,7 @@ jobs:
uses: getsentry/action-release@586b62368d564f25d694ce05fcb9cf53de65ac4f # v1.3.1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ vars.SENTRY_ORG_NAME }}
SENTRY_PROJECT: ${{ env.PROJECT_NAME }}
with:
finalize: false
Expand Down Expand Up @@ -127,8 +125,8 @@ jobs:
- name: Update Publish Image check run
uses: guidojw/actions/update-check-run@abb0ee8d1336edf73383f2e5a09abd3a22f25b13 # v1.3.3
with:
app_id: ${{ env.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
app_id: ${{ vars.GH_APP_ID }}
private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}
name: Publish Image
conclusion: ${{ steps.get_conclusion.outputs.conclusion }}
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}

0 comments on commit 8003885

Please sign in to comment.