Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Commit

Permalink
build container by tag
Browse files Browse the repository at this point in the history
  • Loading branch information
namachan10777 committed Oct 20, 2024
1 parent cd2d4bc commit 341cb6f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Docker Build and Push

on:
push:
branches:
- main
tags:
- "*"

permissions:
id-token: write
Expand All @@ -27,9 +27,13 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get tag name
id: get-tag-name
run: echo "tag-name=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT

- name: Build and push images
uses: docker/build-push-action@v3
with:
context: .
tags: ghcr.io/hpcslab/cfp-summary-server:${{ github.sha }}
tags: ghcr.io/hpcslab/cfp-summary-server:${{ steps.get-tag-name.outputs.tag-name }}
push: true

0 comments on commit 341cb6f

Please sign in to comment.