diff --git a/.github/workflows/build-push-docker.yaml b/.github/workflows/build-push-docker.yaml index 8e971c8d..1b1de72a 100644 --- a/.github/workflows/build-push-docker.yaml +++ b/.github/workflows/build-push-docker.yaml @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/format-lint-test.yaml b/.github/workflows/format-lint-test.yaml index 5f48f5f9..337d3200 100644 --- a/.github/workflows/format-lint-test.yaml +++ b/.github/workflows/format-lint-test.yaml @@ -1,10 +1,12 @@ name: Format, Lint, Test on: - push: - branches: ["dev"] pull_request: - branches: ["dev"] + branches: + - main + - next + - beta + - alpha jobs: build: @@ -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 }} diff --git a/.github/workflows/lint-pr-title.yaml b/.github/workflows/lint-pr-title.yaml index 67fa5425..80a169fd 100644 --- a/.github/workflows/lint-pr-title.yaml +++ b/.github/workflows/lint-pr-title.yaml @@ -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 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 20f05c02..4c952e73 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,7 +1,6 @@ name: Release on: - workflow_dispatch: push: branches: - main @@ -14,7 +13,6 @@ permissions: jobs: release: - name: release runs-on: ubuntu-latest permissions: @@ -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 }}