Skip to content

⬆️ Bump docker/setup-buildx-action from 3.0.0 to 3.1.0 (#499) #103

⬆️ Bump docker/setup-buildx-action from 3.0.0 to 3.1.0 (#499)

⬆️ Bump docker/setup-buildx-action from 3.0.0 to 3.1.0 (#499) #103

name: Docker
on:
push:
branches: [main]
tags:
- v*
env:
IMAGE_NAME: website
DJANGO_SETTINGS_MODULE: website.settings
jobs:
# See also https://docs.docker.com/docker-hub/builds/
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.1.0
- name: Login to DockerHub
uses: docker/login-action@v3.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5.2.0
with:
push: true
tags: |
eduzen/website:latest
eduzen/website:${{ github.sha }}
target: production
file: ./Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
RELEASE=${{ github.sha }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Get today's date in European format
id: date
run: echo "::set-output name=date::$(date +'%d.%m.%Y')"
- name: Release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.date.outputs.date }}-${{ github.sha }}
tag_name: ${{ steps.date.outputs.date }}-${{ github.sha }}
body: Release ${{ github.sha }} from ${{ steps.date.outputs.date }}