Skip to content

Commit

Permalink
Fix build workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
vpzqtsolv committed May 27, 2024
1 parent 6c70cc9 commit f89171f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ permissions:
id-token: write
packages: write

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
container:
name: Build Docker image
Expand All @@ -17,6 +21,10 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get tag or version
id: gitvars
run: |
echo ::set-output name=version::${GITHUB_REF#refs/tags/}
- name: Install cosign
uses: sigstore/[email protected]
with:
Expand All @@ -29,17 +37,13 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get branch name
shell: bash
run: echo "##[set-output name=git_branch;]$(echo ${GITHUB_REF##*/})"
id: extract_branch
- name: Extract Docker metadata
id: meta
uses: docker/[email protected]
with:
images: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
tags: |
type=raw,value=${{ steps.extract_branch.outputs.git_branch }}
type=raw,value=${{ steps.gitvars.outputs.version }}
- name: Build and push Docker image
id: build-and-push
uses: docker/[email protected]
Expand Down

0 comments on commit f89171f

Please sign in to comment.