mirror of
https://github.com/cooperspencer/gickup.git
synced 2026-10-21 08:18:04 +00:00
added tags
This commit is contained in:
@@ -21,18 +21,37 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
# list of Docker images to use as base name for tags
|
||||
images: |
|
||||
buddyspencer/gickup
|
||||
ghcr.io/buddyspencer/gickup
|
||||
# generate Docker tags based on the following events/attributes
|
||||
tags: |
|
||||
type=schedule
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
type=sha
|
||||
# setup Docker buld action
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to Github Packages
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
@@ -44,12 +63,10 @@ jobs:
|
||||
with:
|
||||
# relative path to the place where source code with Dockerfile is located
|
||||
context: .
|
||||
# Note: tags has to be all lower-case
|
||||
tags: |
|
||||
buddyspencer/gickup:latest
|
||||
ghcr.io/buddyspencer/gickup:latest
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
# build on feature branches, push only on main branch
|
||||
push: ${{ github.ref == 'refs/heads/main' }}
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v6
|
||||
|
||||
- name: Image digest
|
||||
|
||||
Reference in New Issue
Block a user