-
-
Notifications
You must be signed in to change notification settings - Fork 103
69 lines (59 loc) · 1.96 KB
/
build.yml
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
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:
name: "Bump Homebrew formula"
runs-on: ubuntu-latest
needs: release
steps:
- uses: mislav/bump-homebrew-formula-action@v3
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
steps:
- name: "Checkout source code at current commit"
uses: actions/checkout@v4
- name: "Docker Build"
id: build
uses: cloudposse/github-action-docker-build-push@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"
run: |
docker pull ${{ steps.build.outputs.image }}:${{ steps.build.outputs.tag}}
- name: "Job Summary"
run: |
echo "## Docker Image Summary" >> $GITHUB_STEP_SUMMARY
echo '```json' >> $GITHUB_STEP_SUMMARY
docker inspect ${{ steps.build.outputs.image }}:${{ steps.build.outputs.tag}} >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY