Update build-push.yml
Use GitHub's provided vars to avoid headaches for everyone™main
parent
1d413aff89
commit
35ca9603e6
|
@ -8,15 +8,14 @@ on:
|
|||
branches: [ "main", "dev" ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
name: Build Docker image and push to registry
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
name: Build Docker image and push to registry
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
@ -39,7 +38,7 @@ jobs:
|
|||
with:
|
||||
# list of Docker images to use as base name for tags
|
||||
images: |
|
||||
ghcr.io/kankerdev/spoticord/bot
|
||||
ghcr.io/${{ github.repository }}
|
||||
# Docker tags based on the following events/attributes
|
||||
tags: |
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
|
@ -59,5 +58,5 @@ jobs:
|
|||
tags: ${{ steps.spoticord.outputs.tags }}
|
||||
labels: ${{ steps.spoticord.outputs.labels }}
|
||||
# Some basic caching of the layers...
|
||||
cache-from: ghcr.io/kankerdev/spoticord/bot:latest-cache
|
||||
cache-to: ghcr.io/kankerdev/spoticord/bot:latest-cache
|
||||
cache-from: ghcr.io/${{ github.repository }}:latest-cache
|
||||
cache-to: ghcr.io/${{ github.repository }}:latest-cache
|
||||
|
|
Loading…
Reference in New Issue