Skip to content

Commit 24620c3

Browse files
committed
CI: add package write perms / nit specify :latest / string not bool
1 parent 466a482 commit 24620c3

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jobs:
2222
- name: build site
2323
run: bundle exec jekyll build --limit-posts 10
2424
docker-build:
25+
permissions:
26+
contents: read
27+
packages: write
2528
runs-on: ubuntu-22.04
2629
name: Dockerised Jekyll Build
2730
steps:
@@ -48,20 +51,20 @@ jobs:
4851
run: |
4952
tag_name="ghcr.io/${GITHUB_REPOSITORY_OWNER}/monero-site-ruby:latest"
5053
case "${{ steps.changes.outputs.rebuild }}" in
51-
true)
54+
"true")
5255
docker build -t "$tag_name" .
5356
;;
5457
*)
5558
docker pull "$tag_name" || docker build -t "$tag_name" .
5659
;;
5760
esac
5861
- name: Build Jekyll site with Docker
59-
run: docker run -v $(pwd):/srv/jekyll ghcr.io/${GITHUB_REPOSITORY_OWNER}/monero-site-ruby bundle exec jekyll build --limit-posts 10
62+
run: docker run -v $(pwd):/srv/jekyll ghcr.io/${GITHUB_REPOSITORY_OWNER}/monero-site-ruby:latest bundle exec jekyll build --limit-posts 10
6063
- name: Push new image to ghcr
6164
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
6265
run: docker push -a ghcr.io/${GITHUB_REPOSITORY_OWNER}/monero-site-ruby
6366
- name: Confirm Gemfile update
64-
if: steps.changes.outputs.diff_gemfile
67+
if: steps.changes.outputs.diff_gemfile == "true"
6568
run: |
6669
cp Gemfile.lock Gemfile.lock.update
6770
docker run -v $(pwd):/srv/jekyll ghcr.io/${GITHUB_REPOSITORY_OWNER}/monero-site-ruby bundle update

0 commit comments

Comments
 (0)