Skip to content

Commit

Permalink
Publish docker image (#174)
Browse files Browse the repository at this point in the history
* Use same go version as dockerfile

* Publish docker image for each release

* reference sha version

---------

Co-authored-by: Elan Hasson <[email protected]>
  • Loading branch information
jcoelho93 and ElanHasson authored Jan 10, 2025
1 parent 59bf253 commit 00a3b94
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: '1.22.5'
go-version: "1.23.4"
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run tests
run: go test ./...
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
push:
tags:
- 'v*'

jobs:
publish-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Docker image
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
with:
context: .
push: true
tags: ghcr.io/digitalocean/app_action:${{ github.ref_name }}

0 comments on commit 00a3b94

Please sign in to comment.