Skip to content

Commit

Permalink
Merge pull request #20 from st-tech/fix-pushing-ci-flow
Browse files Browse the repository at this point in the history
Fix pushing ci flow
  • Loading branch information
civitaspo authored Sep 9, 2021
2 parents 533686e + 3fde50d commit b013cd0
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Get the Tag Name
id: get-tag
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Show the Container Image URI
run: echo ${CONTAINER_IMAGE_REPOSITORY}:${{ steps.get-tag.outputs.tag }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
Expand All @@ -72,13 +66,25 @@ jobs:
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.CONTAINER_IMAGE_REPOSITORY }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=ref,event=tag
type=schedule,pattern={{date 'YYYYMMDD'}}
type=sha
- name: Build and Push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ env.CONTAINER_IMAGE_REPOSITORY }}:${{ steps.get-tag.outputs.tag }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit b013cd0

Please sign in to comment.