Skip to content

Commit 45e0ffb

Browse files
author
Evilazaro Alves
committed
Fix standard CI
1 parent 17024fd commit 45e0ffb

File tree

2 files changed

+23
-37
lines changed

2 files changed

+23
-37
lines changed

.github/actions/ci/bicep-standard-ci/action.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,4 @@ runs:
1919
else
2020
echo "⚠️ Azure CLI not available, creating placeholder artifacts"
2121
echo "Bicep build would be executed here" > ./artifacts/placeholder.txt
22-
fi
23-
24-
- name: Upload Artifacts
25-
uses: actions/upload-artifact@v4
26-
with:
27-
name: artifacts-${{ needs.generate_release.outputs.new_version }}
28-
path: ./artifacts
29-
compression-level: 6
30-
overwrite: true
31-
if-no-files-found: warn
32-
retention-days: 7
33-
34-
- name: Artifact Summary
35-
shell: bash
36-
run: |
37-
branch_name="${{ needs.generate_release.outputs.branch_name }}"
38-
version="${{ needs.generate_release.outputs.new_version }}"
39-
should_publish="${{ needs.generate_release.outputs.should_publish }}"
40-
41-
echo "📦 Artifacts Summary:"
42-
echo " - Version: $version"
43-
echo " - Branch: $branch_name"
44-
echo " - Tag created: ✅"
45-
echo " - Artifacts uploaded: ✅"
46-
echo " - GitHub release will be published: $should_publish"
47-
48-
if [[ "$should_publish" == "false" ]]; then
49-
echo ""
50-
echo "ℹ️ This is a development build from a non-main branch."
51-
echo " Tag and artifacts are created for tracking, but no GitHub release is published."
5222
fi

.github/workflows/release.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: Release
22

33
on:
4-
# push:
5-
# branches:
6-
# - main
7-
# - 'feature/**'
8-
# - 'fix/**'
4+
push:
5+
branches:
6+
- main
7+
- 'feature/**'
8+
- 'fix/**'
99
workflow_dispatch:
1010
inputs:
1111
release_type:
@@ -29,8 +29,24 @@ jobs:
2929
build:
3030
runs-on: ubuntu-latest
3131
steps:
32-
- name: Build Bicep Code
33-
uses: ./.github/actions/ci/bicep-standard-ci.yml
32+
- name: Checkout code
33+
uses: actions/checkout@v4
34+
with:
35+
ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
36+
37+
- name: Build Accelerator Bicep
38+
run: |
39+
echo "✅ Building Bicep templates..."
40+
mkdir -p ./artifacts
41+
42+
# Check if Azure CLI is available
43+
if command -v az &> /dev/null; then
44+
az bicep build --file ./infra/main.bicep --outdir ./artifacts
45+
echo "✅ Bicep build completed"
46+
else
47+
echo "⚠️ Azure CLI not available, creating placeholder artifacts"
48+
echo "Bicep build would be executed here" > ./artifacts/placeholder.txt
49+
fi
3450
3551
generate_release:
3652
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)