Skip to content

Commit 0ca21ba

Browse files
Fix syntax error and give GITHUB_TOKEN write access
1 parent 5279665 commit 0ca21ba

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ on:
1717
jobs:
1818
release:
1919
runs-on: ubuntu-latest
20+
permissions:
21+
contents: write
2022
if: ${{ inputs.environment }}
2123
steps:
2224
- name: Clone repository
@@ -32,6 +34,8 @@ jobs:
3234

3335
- name: Release
3436
run: ./.github/workflows/scripts/release-${{ inputs.environment }}.sh "${{ inputs.version }}"
37+
env:
38+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3539

3640
- name: Log out of container registry
3741
if: always()

.github/workflows/scripts/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ copy_image() {
7979
# regctl allows us to copy the image much faster and avoid downloading duplicate blobs that don't need to be uploaded to the destination registry
8080
regctl image copy "$SOURCE" "$DEST"
8181
IMAGE_ID=$(regctl image digest "$DEST")
82-
else if [ -x "$(command -v skopeo)" ]; then
82+
elif [ -x "$(command -v skopeo)" ]; then
8383
# Skopeo can do the same thing, and it's preinstalled on GitHub Actions runner images
8484
regctl copy "docker://$SOURCE" "docker://$DEST"
8585
IMAGE_ID=$(skopeo inspect --format "{{ .Digest }}" "docker://$DEST")

0 commit comments

Comments
 (0)