Bump docker/setup-buildx-action from 3.7.1 to 3.8.0 (#625) #170
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: 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/[email protected] | |
- name: Login to DockerHub | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/[email protected] | |
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@v2 | |
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 }} |