Skip to content

Commit

Permalink
Update build-push.yml
Browse files Browse the repository at this point in the history
Use GitHub's provided vars to avoid headaches for everyone™
  • Loading branch information
spectrapulse authored Sep 25, 2023
1 parent 1d413af commit 35ca960
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ on:
branches: [ "main", "dev" ]
workflow_dispatch:

permissions:
packages: write
contents: read

jobs:
build-and-push:
name: Build Docker image and push to registry
runs-on: ubuntu-latest

permissions:
packages: write
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -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}}
Expand All @@ -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

0 comments on commit 35ca960

Please sign in to comment.