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" ]
|
branches: [ "main", "dev" ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
name: Build Docker image and push to registry
|
name: Build Docker image and push to registry
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
|
||||||
packages: write
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -39,7 +38,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
# list of Docker images to use as base name for tags
|
# list of Docker images to use as base name for tags
|
||||||
images: |
|
images: |
|
||||||
ghcr.io/kankerdev/spoticord/bot
|
ghcr.io/${{ github.repository }}
|
||||||
# Docker tags based on the following events/attributes
|
# Docker tags based on the following events/attributes
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
|
@ -59,5 +58,5 @@ jobs:
|
||||||
tags: ${{ steps.spoticord.outputs.tags }}
|
tags: ${{ steps.spoticord.outputs.tags }}
|
||||||
labels: ${{ steps.spoticord.outputs.labels }}
|
labels: ${{ steps.spoticord.outputs.labels }}
|
||||||
# Some basic caching of the layers...
|
# Some basic caching of the layers...
|
||||||
cache-from: ghcr.io/kankerdev/spoticord/bot:latest-cache
|
cache-from: ghcr.io/${{ github.repository }}:latest-cache
|
||||||
cache-to: ghcr.io/kankerdev/spoticord/bot:latest-cache
|
cache-to: ghcr.io/${{ github.repository }}:latest-cache
|
||||||
|
|
Loading…
Reference in New Issue