Merge pull request 'Docker build' (#4) from dev into main
Reviewed-on: #4
This commit is contained in:
26
.github/workflows/docker-build.yaml
vendored
26
.github/workflows/docker-build.yaml
vendored
@@ -8,10 +8,30 @@ on:
|
|||||||
- closed
|
- closed
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
if_merged:
|
build-and-push:
|
||||||
if: github.event.pull_request.merged == true
|
if: github.event.pull_request.merged == true
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- run: |
|
- name: Getting the codebase
|
||||||
echo The PR was merged
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: main
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Push to hub
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
tags: ${{ vars.DOCKERHUB_USERNAME }}/django-example-app:latest
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user