-
-
Notifications
You must be signed in to change notification settings - Fork 153
78 lines (68 loc) · 2.39 KB
/
build.yml
File metadata and controls
78 lines (68 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: "Build CLI and attach to GitHub release"
on:
release:
types: [published]
workflow_dispatch:
permissions:
attestations: write
contents: write
id-token: write
pull-requests: write
packages: write
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
release:
uses: cloudposse/.github/.github/workflows/shared-release-branches.yml@main
secrets: inherit
homebrew:
if: ${{ github.event.release.prerelease == false }}
name: "Bump Homebrew formula"
runs-on: ubuntu-latest
needs: release
environment: release
steps:
- uses: mislav/bump-homebrew-formula-action@56a283fa15557e9abaa4bdb63b8212abc68e655c # v3.6
with:
# A PR will be sent to github.com/Homebrew/homebrew-core to update this formula:
formula-name: atmos
formula-path: Formula/a/atmos.rb
env:
COMMITTER_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
docker:
name: "Build and push Docker image for Atmos CLI"
runs-on: ubuntu-latest
needs: release
if: ${{ github.event.release.prerelease == false }}
steps:
- name: "Checkout source code at current commit"
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: "Docker Build"
id: build
uses: cloudposse/github-action-docker-build-push@1d99c3977df15019f21658e2e7d4a2a8818eeb0a # main
with:
registry: ghcr.io
organization: "${{ github.event.repository.owner.login }}"
repository: "${{ github.event.repository.name }}"
login: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"
platforms: linux/amd64,linux/arm64
file: Dockerfile
build-args: |
ATMOS_VERSION=${{ github.event.release.tag_name }}
- name: "Verify Image"
env:
DOCKER_IMAGE: ${{ steps.build.outputs.image }}
DOCKER_TAG: ${{ steps.build.outputs.tag }}
run: |
docker pull "$DOCKER_IMAGE:$DOCKER_TAG"
- name: "Job Summary"
env:
DOCKER_IMAGE: ${{ steps.build.outputs.image }}
DOCKER_TAG: ${{ steps.build.outputs.tag }}
run: |
echo "## Docker Image Summary" >> $GITHUB_STEP_SUMMARY
echo '```json' >> $GITHUB_STEP_SUMMARY
docker inspect "$DOCKER_IMAGE:$DOCKER_TAG" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY