Skip to content

Commit

Permalink
fix: CI (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
MAHDTech committed Mar 24, 2023
1 parent fac1348 commit e610d5b
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 30 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,9 @@ name: Docker

on:

push:
branches:
- trunk
paths-ignore:
- 'docs/**'
- '**.md'

pull_request:
branches:
- trunk
- release/*
types:
- opened
- reopened
Expand All @@ -29,6 +21,10 @@ on:
- 'docs/**'
- '**.md'

permissions:
contents: read
packages: write

env:

REGISTRY: ghcr.io
Expand Down
31 changes: 20 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,25 @@ name: Release

on:

push:
# Treating approved PRs into trunk as "pre-releases"
pull_request_review:
branches:
- trunk
- "trunk"
types:
- submitted
paths-ignore:
- Cargo.toml
- "docs/**"
- "*.md"
- Cargo.lock
- Cargo.toml

pull_request:
# Treating merged PRs into trunk as "releases"
push:
branches:
- trunk
types:
- ready_for_review
- "trunk"
paths-ignore:
- "docs/**"
- "*.md"

permissions:
packages: write
Expand Down Expand Up @@ -80,20 +87,22 @@ jobs:
# ${MAJOR}.${MINOR}.${PATCH}-${PRE-RELEASE}+${BUILD}
- id: prep_release
name: Prepare for Release
uses: salt-labs/action-ship-it@trunk
uses: salt-labs/action-its-shipping-time@trunk
with:
loglevel: "INFO"
tag_enable: "TRUE"
tag_force: "FALSE"
changelog_enable: "TRUE"
git_pretty_format: "* %h %G? %aN - %s"
calver_enable: "TRUE"
calver_scheme: "YYYY.MM.GEN"
calver_split: "."
calver_split_mod: "."
timezone: "Australia/Sydney"

- id: create_release_prerelease
name: Create Pre-Release
if: github.event_name == 'pull_request' && github.event.pull_request.draft == false
if: github.event.review.state == 'approved'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -297,9 +306,9 @@ jobs:
# Publish Docker Container
#########################

release_publish_docker:
release_publish_oci:

name: Publish Release to Docker
name: Publish Release to registry

needs:
- create_release
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,9 @@ name: Rust

on:

push:
branches:
- trunk
paths-ignore:
- 'docs/**'
- '**.md'

pull_request:
branches:
- trunk
- release/*
types:
- opened
- reopened
Expand Down Expand Up @@ -68,9 +60,9 @@ jobs:
- target: x86_64-pc-windows-msvc
os: windows-latest
toolchain: stable
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
toolchain: stable
#- target: aarch64-unknown-linux-gnu
# os: ubuntu-latest
# toolchain: stable
#exclude:

steps:
Expand All @@ -83,9 +75,19 @@ jobs:
toolchain: ${{ matrix.toolchain }}
default: true

- id: setup_rust_arm64
name: Setup the Rust environment for ARM64
if: matrix.target == 'aarch64-unknown-linux-gnu' && matrix.os == 'ubuntu-latest'
run: |
sudo apt install gcc-multilib
- id: checkout_repository
name: Checkout repository
uses: actions/checkout@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
persist-credentials: true

- id: cache_artifacts_cargo_registry
name: Cache Cargo registry
Expand Down

0 comments on commit e610d5b

Please sign in to comment.