-
Notifications
You must be signed in to change notification settings - Fork 9
Docker publish workflow #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6b8196b
09c7358
d683f41
65bddcc
0759b15
1413ac1
a1c999a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,58 @@ | ||||||||
| name: Build And Publish Container | ||||||||
|
|
||||||||
| on: | ||||||||
| push: | ||||||||
| branches: | ||||||||
| - main | ||||||||
| - dev | ||||||||
| tags: | ||||||||
| - 'v*' | ||||||||
| workflow_dispatch: | ||||||||
|
|
||||||||
| env: | ||||||||
| # todo: change to phplist dockerhub | ||||||||
| DOCKERHUB_IMAGE: tatevikg1/phplist4 | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Major: Use organization Docker Hub account instead of personal account. The workflow uses
📝 Suggested change env:
- DOCKERHUB_IMAGE: tatevikg1/phplist4
+ DOCKERHUB_IMAGE: phplist/base-distributionNote: Update the corresponding secrets to use the organization account credentials. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||
|
|
||||||||
| jobs: | ||||||||
| docker: | ||||||||
| runs-on: ubuntu-22.04 | ||||||||
| permissions: | ||||||||
| contents: read | ||||||||
| steps: | ||||||||
| - name: Checkout | ||||||||
| uses: actions/checkout@v4 | ||||||||
|
|
||||||||
| - name: Set up QEMU | ||||||||
| uses: docker/setup-qemu-action@v3 | ||||||||
|
|
||||||||
| - name: Set up Docker Buildx | ||||||||
| uses: docker/setup-buildx-action@v3 | ||||||||
|
|
||||||||
| - name: Log in to Docker Hub | ||||||||
| if: github.event_name != 'pull_request' | ||||||||
| uses: docker/login-action@v3 | ||||||||
| with: | ||||||||
| username: ${{ secrets.DOCKERHUB_USERNAME }} | ||||||||
| password: ${{ secrets.DOCKERHUB_TOKEN }} | ||||||||
|
|
||||||||
| - name: Extract Docker metadata | ||||||||
| id: meta | ||||||||
| uses: docker/metadata-action@v5 | ||||||||
| with: | ||||||||
| images: ${{ env.DOCKERHUB_IMAGE }} | ||||||||
| tags: | | ||||||||
| type=raw,value=latest,enable={{is_default_branch}} | ||||||||
| type=raw,value=test,enable=${{ github.ref == 'refs/heads/dev' }} | ||||||||
| type=ref,event=tag | ||||||||
| type=sha,prefix=sha- | ||||||||
|
coderabbitai[bot] marked this conversation as resolved.
|
||||||||
|
|
||||||||
| - name: Build and push image | ||||||||
| uses: docker/build-push-action@v6 | ||||||||
| with: | ||||||||
| context: . | ||||||||
| file: ./Dockerfile | ||||||||
| platforms: linux/amd64,linux/arm64 | ||||||||
| push: ${{ github.event_name != 'pull_request' }} | ||||||||
| tags: ${{ steps.meta.outputs.tags }} | ||||||||
| labels: ${{ steps.meta.outputs.labels }} | ||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <VirtualHost *:8081> | ||
| ServerName app | ||
| DocumentRoot /var/www/html/public | ||
|
|
||
| <Directory /var/www/html/public> | ||
| AllowOverride All | ||
| Require all granted | ||
| </Directory> | ||
|
|
||
| ErrorLog ${APACHE_LOG_DIR}/error.log | ||
| CustomLog ${APACHE_LOG_DIR}/access.log combined | ||
| </VirtualHost> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Listen 8081 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ServerName app |
Uh oh!
There was an error while loading. Please reload this page.