Skip to content

Commit

Permalink
Merge branch 'main' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandolucchesi committed Sep 25, 2023
2 parents 2a548d2 + ff7955d commit 227461a
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/DEV-studio-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ jobs:
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: failure()
if: failure()
32 changes: 32 additions & 0 deletions .github/workflows/PROD-all-studios-v3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,35 @@ jobs:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: failure()

store-image-tags:
needs: deploy-satellite-studios
runs-on: ubuntu-latest
steps:
- name: Checkout internal 🛎️
id: checkout-internal
uses: actions/checkout@v3
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }}
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14' # Or any version you prefer

- name: Install dependencies
run: |
npm install js-yaml
- name: Run script for 'studio'
run: node ci/storeImageTags.js studio

- name: Commit and push changes
run: |
git config --global user.name 'github'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/equinor/energyvision-internal
git add latest-prod-tags.json
git commit -m "Update latest-prod-tags.json with new tags" || echo "No changes to commit"
git push
32 changes: 32 additions & 0 deletions .github/workflows/PROD-all-webs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,35 @@ jobs:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: failure()

store-image-tags:
needs: deploy
runs-on: ubuntu-latest
steps:
- name: Checkout internal 🛎️
id: checkout-internal
uses: actions/checkout@v3
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }}
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14' # Or any version you prefer

- name: Install dependencies
run: |
npm install js-yaml
- name: Run script for 'web'
run: node ci/storeImageTags.js web

- name: Commit and push changes
run: |
git config --global user.name 'github'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/equinor/energyvision-internal
git add latest-prod-tags.json
git commit -m "Update latest-prod-tags.json with new tags" || echo "No changes to commit"
git push
4 changes: 2 additions & 2 deletions .github/workflows/ghcr-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Delete old container images

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # every day at midnight
# schedule:
# - cron: '0 0 * * *' # every day at midnight

jobs:
clean-ghcr:
Expand Down
54 changes: 25 additions & 29 deletions .github/workflows/ghcr-cleanup_v2.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name: Delete old ghrc images
on:
workflow_dispatch:
# push:
# paths:
# - '.github/workflows/ghcr_cleanup/**'
# - '.github/workflows/ghcr-cleanup_v2.yaml'
# schedule:
# - cron: '0 0 * * *' # every day at midnight
schedule:
- cron: '0 0 * * *' # every day at midnight
permissions:
id-token: write
jobs:
Expand All @@ -16,33 +12,33 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- name: Checkout code
- name: Checkout internal 🛎️
id: checkout-internal
uses: actions/checkout@v3

- name: Get token 🔑
id: get-token
uses: ./.github/workflows/get-auth-token/

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }}

- name: Install dependencies
run: npm install node-fetch
- name: Get tags to keep from output.json
id: get-tags
run: |
TAGS=$(jq -r '[.web + .studio | unique[]] | join(", ")' latest-prod-tags.json)
echo "TAGS_TO_KEEP=$TAGS" >> $GITHUB_ENV
echo "TAGS TO KEEP: $TAGS"
- name: Make API request and get used tags
id: fetch_and_process
run: node '.github/workflows/ghcr_cleanup/cleanup.js'

# - name: Clean up Docker images
# uses: snok/container-retention-policy@v1
# with:
# token: ${{ secrets.NLUN_GITHUB_PAT }}
# account-type: org
# org-name: Equinor
# image-names: energyvision/*
# skip-tags: ${{ steps.fetch_and_process.outputs.tags }}
- name: Clean up Docker images
id: delete-containers
uses: snok/container-retention-policy@v2
with:
token: ${{ secrets.NLUN_GITHUB_PAT }}
account-type: org
org-name: Equinor
image-names: energyvision/equinor/web-global
cut-off: one day ago UTC+2
keep-at-least: 5
# skip-tags: ${{ env.TAGS_TO_KEEP }}
dry-run: true

- name: log-errors-to-slack 📄
uses: act10ns/slack@v2
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/ghcr_cleanup/cleanup.js

This file was deleted.

2 changes: 1 addition & 1 deletion web/pageComponents/pageTemplates/News.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ const NewsPage = ({ data: news }: ArticleProps) => {
{iframe && <BasicIFrame data={iframe} />}

{relatedLinks?.links && relatedLinks.links.length > 0 && (
<Related>
<Related reduceMargin={iframe ? true : false}>
<RelatedContent data={relatedLinks} />
</Related>
)}
Expand Down
6 changes: 6 additions & 0 deletions web/pageComponents/shared/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,14 @@ const FooterLink = styled(NextLink)`
}
`
const FooterBottom = styled.div`
display: flex;
justify-content: left;
min-height: var(--space-large);
padding: var(--space-xLarge) var(--layout-paddingHorizontal-small) var(--space-small);
@media (min-width: 750px) {
justify-content: center;
}
`

const SomeIcon = styled.span`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const Fact = (block: BlockProps) => {

const hasColumns = !imageSrc && plainText.length > 800
const hasImage = imageSrc ? true : false
const hasBgColor = backgroundColor !== 'none'

return (
<FactBoxWithPadding
Expand All @@ -83,7 +84,12 @@ export const Fact = (block: BlockProps) => {
</FactBox.Image>
)}

<FactBoxContentWithPadding dynamicHeight={dynamicHeight} hasImage={hasImage} hasColumns={hasColumns}>
<FactBoxContentWithPadding
dynamicHeight={dynamicHeight}
hasImage={hasImage}
hasColumns={hasColumns}
hasBgColor={hasBgColor}
>
{title && (
<Heading size="xl" level="h3">
{title}
Expand Down
5 changes: 2 additions & 3 deletions web/public/.well-known/security.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Contact: https://www.equinor.com/about-us/csirt
Encryption: https://cdn.equinor.com/files/h61q9gi9/global/93bab8605ac16b2a19e25b2bb796c0c8afafcc67.asc?equinor-csirt-pgp-public-key-july-2019.asc
Preferred-Languages: en
Expires: 2023-05-12T08:08:03z
Encryption: https://cdn.equinor.com/files/h61q9gi9/global/93bab8605ac16b2a19e25b2bb796c0c8afafcc67.asc?equinor-csirt.pub.asc
Preferred-Languages: en

0 comments on commit 227461a

Please sign in to comment.