Skip to content

Commit

Permalink
simplified workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sinamna committed Apr 24, 2024
1 parent 128cf1c commit 70a538b
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,32 @@ jobs:
uses: docker/login-action@v3
with:
registry: ghcr.io
username: sinamna
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get Image Tags
id: tags
run: |
version=$(sed 's/^v//' <<< ${{ github.ref_name }})
echo tags="latest,${version}" >> $GITHUB_OUTPUT
- name: Build and Push
uses: docker/bake-action@v4
env:
TAGS: "${{ steps.tags.outputs.tags }}"
REGISTRY: "ghcr.io"
# - name: Get Image Tags
# id: tags
# run: |
# version=$(sed 's/^v//' <<< ${{ github.ref_name }})
# echo tags="latest,${version}" >> $GITHUB_OUTPUT
- uses: docker/metadata-action@v4
id: meta
with:
images: ghcr.io/${{ github.repository }}
# - name: Build and Push
# uses: docker/bake-action@v4
# env:
# TAGS: "${{ steps.tags.outputs.tags }}"
# REGISTRY: "ghcr.io"
# with:
# push: true
# set:
# goreleaser.args.GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v4
with:
file: "Dockerfile"
context: .
platforms: linux/amd64
push: true
set:
goreleaser.args.GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 70a538b

Please sign in to comment.