Skip to content

Commit

Permalink
Workflow fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shiroyashik committed Jun 8, 2024
1 parent 622dc81 commit 17cb9ba
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ on:
- v*.*.*

permissions:
packages: write
contents: write
actions: write
packages: write
attestations: write
pages: write
id-token: write

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
Expand All @@ -20,13 +22,6 @@ env:
jobs:
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
attestations: write
pages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -44,7 +39,7 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=latest
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
Expand All @@ -65,5 +60,4 @@ jobs:
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

push-to-registry: true

0 comments on commit 17cb9ba

Please sign in to comment.