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

ci: update target branches, workflow triggers, preview release #144

Merged
merged 4 commits into from
Nov 19, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/build-push-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ name: Build and push Docker image
on:
# TODO: `workflow_dispatch` should be removed once manual docker builds from branches are not needed anymore
workflow_dispatch:
push:
branches: ["dev"]

env:
REGISTRY_IMAGE: impiercetechnologies/ssi-agent
Expand Down Expand Up @@ -50,7 +48,7 @@ jobs:

- name: Build and push by digest
id: build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: agent_application/docker/Dockerfile
Expand Down Expand Up @@ -93,7 +91,11 @@ jobs:
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
type=sha,prefix=
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=sha

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/format-lint-test.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Format, Lint, Test

on:
push:
branches: ["dev"]
pull_request:
branches: ["dev"]
branches:
- main
- next
- beta
- alpha

jobs:
build:
Expand All @@ -23,3 +25,12 @@ jobs:

- name: Test
run: cargo test --workspace

- uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: Release Preview
run: npx semantic-release@24 --dry-run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 0 additions & 2 deletions .github/workflows/lint-pr-title.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
with:
node-version: "lts/*"

- run: npm ci

- run: echo $TITLE | npx commitlint
env:
# Security: we mitigate script injections by using an intermediate environment variable
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Release

on:
workflow_dispatch:
push:
branches:
- main
Expand All @@ -14,7 +13,6 @@ permissions:

jobs:
release:
name: release
runs-on: ubuntu-latest

permissions:
Expand All @@ -23,15 +21,15 @@ jobs:
pull-requests: write # to be able to comment on released pull requests

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: Release
- name: semantic-release
run: npx semantic-release@24
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading