Skip to content

Commit

Permalink
chore: push to gh container registry
Browse files Browse the repository at this point in the history
This approach essentially works the same as the one in the previous
commit, but allows more control over the name of the package as it
appears in the org packages tab and repo packages.
  • Loading branch information
rise-erpelding committed Sep 22, 2023
1 parent 82987f3 commit 0a9c588
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,14 @@ jobs:
- name: Build theme
run: npm run build:prod

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and export
uses: docker/build-push-action@v5
with:
context: .
tags: myimage:latest
outputs: type=docker, dest=/tmp/myimage.tar

- name: Upload artifact
uses: actions/upload-artifact@v3
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v1
with:
name: myimage
path: /tmp/myimage.tar
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GH_TOKEN}}

- name: 'Build Inventory Image'
run: |
docker build . --tag ghcr.io/sparkbox/sparkpress:latest
docker push ghcr.io/sparkbox/sparkpress:latest
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM php:8.1-apache-buster

LABEL org.opencontainers.image.source=https://github.com/sparkbox/sparkpress-wordpress-starter

# When changings, also change in .circleci/config.yml
ENV WP_VERSION=6.3.1

Expand Down Expand Up @@ -34,4 +36,4 @@ RUN find /var/www/ -type f -exec chmod 644 {} \;

# make the linters executable so we can run them from containers
RUN chmod +x vendor/bin/phpcs
RUN chmod +x vendor/bin/twigcs
RUN chmod +x vendor/bin/twigcs

0 comments on commit 0a9c588

Please sign in to comment.