Build and push development Dockerfile Docker ride-to-work-by-bike-frontend-dev image #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push development Dockerfile Docker ride-to-work-by-bike-frontend-dev image | |
on: | |
schedule: | |
- cron: '0 0 * * 1' | |
# Run once per week on Monday | |
jobs: | |
push-docker-img: | |
runs-on: ubuntu-latest | |
outputs: | |
dockerhub_image_version: ${{ steps.set_output.outputs.dockerhub_image_version }} | |
steps: | |
- name: Checkout app repository code | |
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: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Get Docker image version | |
run: | | |
.github/workflows/get_docker_image_tag_number.sh \ | |
${{ secrets.DOCKERHUB_REPO_OWNER }} ${{ secrets.DOCKERHUB_REPO_DEV_DOCKERFILE_REPO_NAME }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./ | |
file: ./docker/dev/Dockerfile | |
push: true | |
tags: | | |
${{ secrets.DOCKERHUB_REPO_OWNER }}/${{ secrets.DOCKERHUB_REPO_DEV_DOCKERFILE_REPO_NAME }}:${{ env.DOCKERHUB_IMAGE_VERSION }} | |
${{ secrets.DOCKERHUB_REPO_OWNER }}/${{ secrets.DOCKERHUB_REPO_DEV_DOCKERFILE_REPO_NAME }}:latest |