Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Figma icons (test) #322

Draft
wants to merge 24 commits into
base: production
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
89 changes: 48 additions & 41 deletions .github/workflows/figma-export.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
type: boolean
default: true
description: Draft PR
branch_name:
default: "import-figma-icons"
required: false
description: Branch to create PR (for test)

env:
TELEFONICA_FIGMA_ID: JXy7Y07eb0Axg0ThVRWKju
Expand All @@ -35,6 +39,7 @@ env:
O2_NEW_FILE_URL: https://www.figma.com/design/CjvgrHEIycSQ6exznxnFXT/O2?m=auto&node-id=4-0&t=0HBFuR3VADUhh5Zr-1
BLAU_FILE_URL: https://www.figma.com/design/czemeClWRGBI8oF7caNa5m/Blau?node-id=0-1&node-type=canvas&t=CM2TIEBRzYVgRX5A-0
VIVO_FILE_URL: https://www.figma.com/design/EApRpjaTyUOwW5VQU2ZqgP/Vivo?node-id=4-0&node-type=canvas&t=pnjxXOX7B7hd3BmJ-0
BRANCH_NAME: ${{github.event.inputs.branch_name}}

jobs:
export-all:
Expand All @@ -49,14 +54,14 @@ jobs:
- name: Install packages
run: |
npm install figma-export-icons --save
sudo apt-get install -y librsvg2-bin libimage-exiftool-perl qpdf
sudo apt-get install -y librsvg2-bin libimage-exiftool-perl
- name: Checkout branch or create new one
run: |
git fetch
if git branch -a | grep origin/import-figma-icons; then
git checkout import-figma-icons
if git branch -a | grep origin/${{env.BRANCH_NAME}}; then
git checkout ${{env.BRANCH_NAME}}
else
git checkout -b import-figma-icons
git checkout -b ${{env.BRANCH_NAME}}
fi
- name: Generate icon config
run: |
Expand Down Expand Up @@ -94,13 +99,15 @@ jobs:
run: |
yarn global add svgo
svgo -f icons -r -o icons

- name: Convert to PDF
run: |
sudo apt-get update && sudo apt-get install -y mat2
sudo apt-get update && sudo apt-get install -y mat2 && sudo apt install mupdf-tools
for i in $(find icons -type f -name "*.svg"); do rsvg-convert -f pdf -o ${i%.*}.pdf $i; done
find icons -type f -name "*.pdf" | while IFS= read -r file; do
echo "$file"
echo "Processing $file"
exiftool -overwrite_original_in_place -all:all= "$file" > /dev/null 2>&1
mutool clean -d "$file"
done
- name: Readme generator
run: sudo python3 .github/md-generator/generate_markdown.py icons
Expand All @@ -113,16 +120,16 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Figma icons updated"
git push origin import-figma-icons
git push origin ${{env.BRANCH_NAME}}
- name: Create Pull-Request
uses: repo-sync/pull-request@v2
with:
source_branch: import-figma-icons
source_branch: ${{env.BRANCH_NAME}}
destination_branch: "production"
pr_title: "Update Figma icons"
pr_body: "
New version of icons exported from [Mistica Icons](${{env.MISTICA_ICONS_FILE_URL}}), [O2](${{env.O2_FILE_URL}}), [O2-new](${{env.O2_NEW_FILE_URL}}), [Blau](${{env.BLAU_FILE_URL}}) & [Vivo](${{env.VIVO_FILE_URL}}) \n
- [ ] [Review icon table in import-figma-icons](https://github.com/Telefonica/mistica-icons/tree/import-figma-icons)"
- [ ] [Review icon table in ${{env.BRANCH_NAME}}](https://github.com/Telefonica/mistica-icons/tree/${{env.BRANCH_NAME}})"
pr_draft: ${{ github.event.inputs.draft }}
github_token: ${{ secrets.NOVUM_PRIVATE_REPOS }}

Expand All @@ -142,10 +149,10 @@ jobs:
- name: Checkout branch or create new one
run: |
git fetch
if git branch -a | grep origin/import-figma-icons; then
git checkout import-figma-icons
if git branch -a | grep origin/${{env.BRANCH_NAME}}; then
git checkout ${{env.BRANCH_NAME}}
else
git checkout -b import-figma-icons
git checkout -b ${{env.BRANCH_NAME}}
fi
- name: Generate icon config
run: |
Expand Down Expand Up @@ -177,16 +184,16 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Figma icons updated"
git push origin import-figma-icons
git push origin ${{env.BRANCH_NAME}}
- name: Create Pull-Request
uses: repo-sync/pull-request@v2
with:
source_branch: import-figma-icons
source_branch: ${{env.BRANCH_NAME}}
destination_branch: "production"
pr_title: "Update Mística icons"
pr_body: "
New version of icons exported from [Mistica Icons](${{env.MISTICA_ICONS_FILE_URL}}) \n
- [ ] [Review icon table in import-figma-icons](https://github.com/Telefonica/mistica-icons/tree/import-figma-icons)"
- [ ] [Review icon table in ${{env.BRANCH_NAME}}](https://github.com/Telefonica/mistica-icons/tree/${{env.BRANCH_NAME}})"
pr_draft: ${{ github.event.inputs.draft }}
github_token: ${{ secrets.NOVUM_PRIVATE_REPOS }}

Expand All @@ -206,10 +213,10 @@ jobs:
- name: Checkout branch or create new one
run: |
git fetch
if git branch -a | grep origin/import-figma-icons; then
git checkout import-figma-icons
if git branch -a | grep origin/${{env.BRANCH_NAME}}; then
git checkout ${{env.BRANCH_NAME}}
else
git checkout -b import-figma-icons
git checkout -b ${{env.BRANCH_NAME}}
fi
- name: Generate icon config
run: |
Expand Down Expand Up @@ -241,16 +248,16 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Figma icons updated"
git push origin import-figma-icons
git push origin ${{env.BRANCH_NAME}}
- name: Create Pull-Request
uses: repo-sync/pull-request@v2
with:
source_branch: import-figma-icons
source_branch: ${{env.BRANCH_NAME}}
destination_branch: "production"
pr_title: "Update O2 icons"
pr_body: "
New version of icons exported from [O2](${{env.O2_FILE_URL}}) \n
- [ ] [Review icon table in import-figma-icons](https://github.com/Telefonica/mistica-icons/tree/import-figma-icons)"
- [ ] [Review icon table in ${{env.BRANCH_NAME}}](https://github.com/Telefonica/mistica-icons/tree/${{env.BRANCH_NAME}})"
pr_draft: ${{ github.event.inputs.draft }}
github_token: ${{ secrets.NOVUM_PRIVATE_REPOS }}

Expand All @@ -270,10 +277,10 @@ jobs:
- name: Checkout branch or create new one
run: |
git fetch
if git branch -a | grep origin/import-figma-icons; then
git checkout import-figma-icons
if git branch -a | grep origin/${{env.BRANCH_NAME}}; then
git checkout ${{env.BRANCH_NAME}}
else
git checkout -b import-figma-icons
git checkout -b ${{env.BRANCH_NAME}}
fi
- name: Generate icon config
run: |
Expand Down Expand Up @@ -305,16 +312,16 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Figma icons updated"
git push origin import-figma-icons
git push origin ${{env.BRANCH_NAME}}
- name: Create Pull-Request
uses: repo-sync/pull-request@v2
with:
source_branch: import-figma-icons
source_branch: ${{env.BRANCH_NAME}}
destination_branch: "production"
pr_title: "Update O2-new icons"
pr_body: "
New version of icons exported from [O2-new](${{env.O2_FILE_URL}}) \n
- [ ] [Review icon table in import-figma-icons](https://github.com/Telefonica/mistica-icons/tree/import-figma-icons)"
- [ ] [Review icon table in ${{env.BRANCH_NAME}}](https://github.com/Telefonica/mistica-icons/tree/${{env.BRANCH_NAME}})"
pr_draft: ${{ github.event.inputs.draft }}
github_token: ${{ secrets.NOVUM_PRIVATE_REPOS }}

Expand All @@ -334,10 +341,10 @@ jobs:
- name: Checkout branch or create new one
run: |
git fetch
if git branch -a | grep origin/import-figma-icons; then
git checkout import-figma-icons
if git branch -a | grep origin/${{env.BRANCH_NAME}}; then
git checkout ${{env.BRANCH_NAME}}
else
git checkout -b import-figma-icons
git checkout -b ${{env.BRANCH_NAME}}
fi
- name: Generate icon config
run: |
Expand Down Expand Up @@ -367,16 +374,16 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Figma icons updated"
git push origin import-figma-icons
git push origin ${{env.BRANCH_NAME}}
- name: Create Pull-Request
uses: repo-sync/pull-request@v2
with:
source_branch: import-figma-icons
source_branch: ${{env.BRANCH_NAME}}
destination_branch: "production"
pr_title: "Update Blau icons"
pr_body: "
New version of icons exported from [Blau](${{env.BLAU_FILE_URL}}) \n
- [ ] [Review icon table in import-figma-icons](https://github.com/Telefonica/mistica-icons/tree/import-figma-icons)"
- [ ] [Review icon table in ${{env.BRANCH_NAME}}](https://github.com/Telefonica/mistica-icons/tree/${{env.BRANCH_NAME}})"
pr_draft: ${{ github.event.inputs.draft }}
github_token: ${{ secrets.NOVUM_PRIVATE_REPOS }}

Expand All @@ -396,10 +403,10 @@ jobs:
- name: Checkout branch or create new one
run: |
git fetch
if git branch -a | grep origin/import-figma-icons; then
git checkout import-figma-icons
if git branch -a | grep origin/${{env.BRANCH_NAME}}; then
git checkout ${{env.BRANCH_NAME}}
else
git checkout -b import-figma-icons
git checkout -b ${{env.BRANCH_NAME}}
fi
- name: Generate icon config
run: |
Expand Down Expand Up @@ -431,22 +438,22 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Figma icons updated"
git push origin import-figma-icons
git push origin ${{env.BRANCH_NAME}}
- name: Create Pull-Request
uses: repo-sync/pull-request@v2
with:
source_branch: import-figma-icons
source_branch: ${{env.BRANCH_NAME}}
destination_branch: "production"
pr_title: "Update Vivo icons"
pr_body: "
New version of icons exported from [Vivo](${{env.VIVO_FILE_URL}}) \n
- [ ] [Review icon table in import-figma-icons](https://github.com/Telefonica/mistica-icons/tree/import-figma-icons)"
- [ ] [Review icon table in ${{env.BRANCH_NAME}}](https://github.com/Telefonica/mistica-icons/tree/${{env.BRANCH_NAME}})"
pr_draft: ${{ github.event.inputs.draft }}
github_token: ${{ secrets.NOVUM_PRIVATE_REPOS }}
# pr_body: "
# New version of icons exported from [Mistica Icons][mistica-icons] & [O2][o2-icons] n\
# - [ ] [Review icon table in import-figma-icons][readme] n\
# - [ ] [Review icon table in ${{env.BRANCH_NAME}}][readme] n\

# [mistica-icons]: https://www.figma.com/file/${{env.TELEFONICA_FIGMA_ID}}/Mistica'-Icons?node-id=0%3A71 n\
# [o2-icons]: https://www.figma.com/file/${{env.O2_FIGMA_ID}}/?node-id=611%3A3298 n\
# [readme]: https://github.com/Telefonica/mistica-icons/tree/import-figma-icons"
# [readme]: https://github.com/Telefonica/mistica-icons/tree/${{env.BRANCH_NAME}}"
8 changes: 7 additions & 1 deletion ICON_TABLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@
|![arrows-left-and-right-filled](icons/telefonica/filled/arrows-left-and-right-filled.svg) | |![arrows-left-and-right-filled](icons/o2-new/filled/arrows-left-and-right-filled.svg) |![arrows-left-and-right-filled](icons/o2/filled/arrows-left-and-right-filled.svg) | |<a id='arrows-left-and-right-filled'>`arrows-left-and-right-filled`</a>[![arrows-left-and-right-filled](.github/resources/anchor.svg)](#arrows-left-and-right-filled)|
|![arrows-left-and-right-light](icons/telefonica/light/arrows-left-and-right-light.svg) | |![arrows-left-and-right-light](icons/o2-new/light/arrows-left-and-right-light.svg) |![arrows-left-and-right-light](icons/o2/light/arrows-left-and-right-light.svg) | |<a id='arrows-left-and-right-light'>`arrows-left-and-right-light`</a>[![arrows-left-and-right-light](.github/resources/anchor.svg)](#arrows-left-and-right-light)|
|![arrows-left-and-right-regular](icons/telefonica/regular/arrows-left-and-right-regular.svg) | |![arrows-left-and-right-regular](icons/o2-new/regular/arrows-left-and-right-regular.svg) |![arrows-left-and-right-regular](icons/o2/regular/arrows-left-and-right-regular.svg) | |<a id='arrows-left-and-right-regular'>`arrows-left-and-right-regular`</a>[![arrows-left-and-right-regular](.github/resources/anchor.svg)](#arrows-left-and-right-regular)|
|![artificial-intelligence-filled](icons/telefonica/filled/artificial-intelligence-filled.svg) | | | | |<a id='artificial-intelligence-filled'>`artificial-intelligence-filled`</a>[![artificial-intelligence-filled](.github/resources/anchor.svg)](#artificial-intelligence-filled)|
|![artificial-intelligence-light](icons/telefonica/light/artificial-intelligence-light.svg) | | | | |<a id='artificial-intelligence-light'>`artificial-intelligence-light`</a>[![artificial-intelligence-light](.github/resources/anchor.svg)](#artificial-intelligence-light)|
|![artificial-intelligence-regular](icons/telefonica/regular/artificial-intelligence-regular.svg) | | | | |<a id='artificial-intelligence-regular'>`artificial-intelligence-regular`</a>[![artificial-intelligence-regular](.github/resources/anchor.svg)](#artificial-intelligence-regular)|
|![audio-filled](icons/telefonica/filled/audio-filled.svg) | |![audio-filled](icons/o2-new/filled/audio-filled.svg) |![audio-filled](icons/o2/filled/audio-filled.svg) | |<a id='audio-filled'>`audio-filled`</a>[![audio-filled](.github/resources/anchor.svg)](#audio-filled)|
|![audio-light](icons/telefonica/light/audio-light.svg) | |![audio-light](icons/o2-new/light/audio-light.svg) |![audio-light](icons/o2/light/audio-light.svg) | |<a id='audio-light'>`audio-light`</a>[![audio-light](.github/resources/anchor.svg)](#audio-light)|
|![audio-regular](icons/telefonica/regular/audio-regular.svg) |![audio-regular](icons/vivo-new/regular/audio-regular.svg) |![audio-regular](icons/o2-new/regular/audio-regular.svg) |![audio-regular](icons/o2/regular/audio-regular.svg) | |<a id='audio-regular'>`audio-regular`</a>[![audio-regular](.github/resources/anchor.svg)](#audio-regular)|
Expand Down Expand Up @@ -1122,6 +1125,9 @@
|![mute-filled](icons/telefonica/filled/mute-filled.svg) | |![mute-filled](icons/o2-new/filled/mute-filled.svg) |![mute-filled](icons/o2/filled/mute-filled.svg) | |<a id='mute-filled'>`mute-filled`</a>[![mute-filled](.github/resources/anchor.svg)](#mute-filled)|
|![mute-light](icons/telefonica/light/mute-light.svg) | |![mute-light](icons/o2-new/light/mute-light.svg) |![mute-light](icons/o2/light/mute-light.svg) | |<a id='mute-light'>`mute-light`</a>[![mute-light](.github/resources/anchor.svg)](#mute-light)|
|![mute-regular](icons/telefonica/regular/mute-regular.svg) | |![mute-regular](icons/o2-new/regular/mute-regular.svg) |![mute-regular](icons/o2/regular/mute-regular.svg) | |<a id='mute-regular'>`mute-regular`</a>[![mute-regular](.github/resources/anchor.svg)](#mute-regular)|
| | |![my-handy-filled](icons/o2-new/filled/my-handy-filled.svg) | | |<a id='my-handy-filled'>`my-handy-filled`</a>[![my-handy-filled](.github/resources/anchor.svg)](#my-handy-filled)|
| | |![my-handy-light](icons/o2-new/light/my-handy-light.svg) | | |<a id='my-handy-light'>`my-handy-light`</a>[![my-handy-light](.github/resources/anchor.svg)](#my-handy-light)|
| | |![my-handy-regular](icons/o2-new/regular/my-handy-regular.svg) | | |<a id='my-handy-regular'>`my-handy-regular`</a>[![my-handy-regular](.github/resources/anchor.svg)](#my-handy-regular)|
| |![negative-film-regular](icons/vivo-new/regular/negative-film-regular.svg) | | | |<a id='negative-film-regular'>`negative-film-regular`</a>[![negative-film-regular](.github/resources/anchor.svg)](#negative-film-regular)|
| | |![network-hotspot-filled](icons/o2-new/filled/network-hotspot-filled.svg) |![network-hotspot-filled](icons/o2/filled/network-hotspot-filled.svg) | |<a id='network-hotspot-filled'>`network-hotspot-filled`</a>[![network-hotspot-filled](.github/resources/anchor.svg)](#network-hotspot-filled)|
| | |![network-hotspot-light](icons/o2-new/light/network-hotspot-light.svg) |![network-hotspot-light](icons/o2/light/network-hotspot-light.svg) | |<a id='network-hotspot-light'>`network-hotspot-light`</a>[![network-hotspot-light](.github/resources/anchor.svg)](#network-hotspot-light)|
Expand Down Expand Up @@ -1373,7 +1379,7 @@
|![route-regular](icons/telefonica/regular/route-regular.svg) | | | | |<a id='route-regular'>`route-regular`</a>[![route-regular](.github/resources/anchor.svg)](#route-regular)|
|![router-filled](icons/telefonica/filled/router-filled.svg) | |![router-filled](icons/o2-new/filled/router-filled.svg) |![router-filled](icons/o2/filled/router-filled.svg) | |<a id='router-filled'>`router-filled`</a>[![router-filled](.github/resources/anchor.svg)](#router-filled)|
|![router-light](icons/telefonica/light/router-light.svg) | |![router-light](icons/o2-new/light/router-light.svg) |![router-light](icons/o2/light/router-light.svg) | |<a id='router-light'>`router-light`</a>[![router-light](.github/resources/anchor.svg)](#router-light)|
|![router-regular](icons/telefonica/regular/router-regular.svg) |![router-regular](icons/vivo-new/regular/router-regular.svg) |![router-regular](icons/o2-new/regular/router-regular.svg) |![router-regular](icons/o2/regular/router-regular.svg) | |<a id='router-regular'>`router-regular`</a>[![router-regular](.github/resources/anchor.svg)](#router-regular)|
|![router-regular](icons/telefonica/regular/router-regular.svg) | |![router-regular](icons/o2-new/regular/router-regular.svg) |![router-regular](icons/o2/regular/router-regular.svg) | |<a id='router-regular'>`router-regular`</a>[![router-regular](.github/resources/anchor.svg)](#router-regular)|
| |![routine-filled](icons/vivo-new/filled/routine-filled.svg) | | | |<a id='routine-filled'>`routine-filled`</a>[![routine-filled](.github/resources/anchor.svg)](#routine-filled)|
| |![routine-light](icons/vivo-new/light/routine-light.svg) | | | |<a id='routine-light'>`routine-light`</a>[![routine-light](.github/resources/anchor.svg)](#routine-light)|
| |![routine-regular](icons/vivo-new/regular/routine-regular.svg) | | | |<a id='routine-regular'>`routine-regular`</a>[![routine-regular](.github/resources/anchor.svg)](#routine-regular)|
Expand Down
Loading
Loading