Skip to content

Commit

Permalink
ci: optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Oct 12, 2023
1 parent 0bc9de6 commit 833ffde
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
21 changes: 4 additions & 17 deletions .github/workflows/build-push.yml
Expand Up @@ -53,39 +53,26 @@ jobs:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
fetch-depth: 0
show-progress: false

- uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.1.2

- name: init
run: |
echo "OWNER=${OWNER,,}" >> ${GITHUB_ENV}
echo "CACHE_WEEK=$(date +%U)" >> $GITHUB_ENV
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
- name: 📥 Setup Node.js
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn

- name: enable corepack
run: sudo corepack enable

- name: Init platform
run: |
git config --global core.autocrlf false
git config --global core.symlinks true
git config --global user.email 'renovate@whitesourcesoftware.com'
git config --global user.name 'Renovate Bot'
echo "CACHE_WEEK=$(date +%U)" >> $GITHUB_ENV

- name: Docker registry login
if: github.ref_name == 'main'
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: Installing dependencies
run: yarn install

- name: prepare apt proxy
run: sudo yarn prepare:proxy

Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Expand Up @@ -28,6 +28,8 @@ jobs:
checks: write
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
show-progress: false

- name: 📥 Setup Node.js
uses: ./.github/actions/setup-node
Expand All @@ -45,6 +47,8 @@ jobs:

steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
show-progress: false

- name: 📥 Setup Node.js
uses: ./.github/actions/setup-node
Expand Down Expand Up @@ -75,6 +79,8 @@ jobs:

steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
show-progress: false

- name: Install ubuntu dependencies
run: |
Expand All @@ -99,6 +105,8 @@ jobs:

steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
show-progress: false

- name: 📥 Setup Node.js
uses: ./.github/actions/setup-node
Expand All @@ -118,6 +126,8 @@ jobs:

steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
show-progress: false

- name: init
run: |
Expand Down Expand Up @@ -156,6 +166,8 @@ jobs:

steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
show-progress: false

- name: init
run: |
Expand Down Expand Up @@ -216,6 +228,8 @@ jobs:
command: docker-config

- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
show-progress: false

- name: init
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/trivy.yml
Expand Up @@ -15,6 +15,8 @@ jobs:
security-events: write
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
show-progress: false

- uses: aquasecurity/trivy-action@e5f43133f6e8736992c9f3c1b3296e24b37e17f2 # 0.10.0
with:
Expand Down

0 comments on commit 833ffde

Please sign in to comment.