Fix Artifact Naming #3
1 changed files with 55 additions and 52 deletions
|
|
@ -1,67 +1,70 @@
|
||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- "v*"
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
audit-test-build:
|
audit-test-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: oven/bun:1
|
container: oven/bun:1
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Install git
|
||||||
uses: actions/checkout@v4
|
run: apt-get update && apt-get install -y git
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Checkout
|
||||||
run: bun install --frozen-lockfile
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Audit dependencies
|
- name: Install dependencies
|
||||||
run: bun audit
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Audit dependencies
|
||||||
run: bun run test:unit run
|
run: bun audit
|
||||||
|
|
||||||
- name: Build
|
- name: Run unit tests
|
||||||
run: bun run build
|
run: bun run test:unit run
|
||||||
|
|
||||||
- name: Upload dist
|
- name: Build
|
||||||
uses: actions/upload-artifact@v4
|
run: bun run build
|
||||||
with:
|
|
||||||
name: dist
|
|
||||||
path: dist
|
|
||||||
|
|
||||||
publish:
|
- name: Upload dist
|
||||||
needs: audit-test-build
|
uses: actions/upload-artifact@v4
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
with:
|
||||||
runs-on: ubuntu-latest
|
name: dist
|
||||||
steps:
|
path: dist
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Download dist
|
publish:
|
||||||
uses: actions/download-artifact@v4
|
needs: audit-test-build
|
||||||
with:
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
name: dist
|
runs-on: ubuntu-latest
|
||||||
path: dist
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Log in to registry
|
- name: Download dist
|
||||||
uses: docker/login-action@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
registry: git.mcpeakdev.com
|
name: dist
|
||||||
username: ${{ github.actor }}
|
path: dist
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
||||||
|
|
||||||
- name: Extract image tag
|
- name: Log in to registry
|
||||||
id: meta
|
uses: docker/login-action@v3
|
||||||
run: echo "tag=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
with:
|
||||||
|
registry: git.mcpeakdev.com
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Extract image tag
|
||||||
uses: docker/build-push-action@v6
|
id: meta
|
||||||
with:
|
run: echo "tag=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
||||||
context: .
|
|
||||||
push: true
|
- name: Build and push
|
||||||
tags: |
|
uses: docker/build-push-action@v6
|
||||||
git.mcpeakdev.com/mcpeakml/portfolio:${{ steps.meta.outputs.tag }}
|
with:
|
||||||
git.mcpeakdev.com/mcpeakml/portfolio:latest
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.mcpeakdev.com/mcpeakml/portfolio:${{ steps.meta.outputs.tag }}
|
||||||
|
git.mcpeakdev.com/mcpeakml/portfolio:latest
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue