Skip to content

Commit

Permalink
updated docker github action
Browse files Browse the repository at this point in the history
  • Loading branch information
aadityabhatia committed Aug 14, 2023
1 parent a8ab53d commit ee4aa20
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Create and publish a Docker image

on:
push:
branches:
- 'main'
branches: ['*']
tags: ['v*.*.*']

env:
REGISTRY: ghcr.io
Expand All @@ -21,26 +21,27 @@ jobs:
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v2.2.0
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.CORSAIR_GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4.6.0
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=schedule
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
uses: docker/build-push-action@v4.1.1
uses: docker/build-push-action@v4
with:
context: .
push: true
Expand Down

0 comments on commit ee4aa20

Please sign in to comment.