Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(release.yml): Correct Docker build release #69

Merged
merged 2 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release
on:
push:
tags:
- 'v*'
- "v*"
jobs:
binary:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -49,6 +49,9 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v5
Expand All @@ -57,6 +60,8 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
LDFLAGS="-s -w -X main.BuildVersion=${{ github.ref }} -X main.BuildGitTag=${{ github.ref }} -X main.BuildDate=${{ steps.date.outputs.date }}"
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ make build

### Docker

Docker images hosted on GitHub Container Registry are also provided:
Docker images hosted on [GitHub Container Registry](https://github.com/nieomylnieja/go-libyear/pkgs/container/go-libyear)
are also provided:

```shell
docker pull ghcr.io/nieomylnieja/go-libyear:latest
docker run --rm ghcr.io/nieomylnieja/go-libyear -p github.com/nieomylnieja/go-libyear
```

## Usage
Expand Down