Skip to content

Fixed latest change log date #319

Fixed latest change log date

Fixed latest change log date #319

---
name: Build & Deploy Production
on:
push:
branches: [master]
jobs:
build-docker-images:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [20]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Set current date as env variable
run: echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV
- name: Set Short SHA variable
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV
- name: Get Latest tag
id: latesttag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 'UNKNOWN' # Optional fallback tag to use when no tag can be found
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: latest
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push production image
uses: docker/build-push-action@v3
with:
file: provisioning/production/Dockerfile
platforms: linux/amd64
push: true
tags: maelstromeous/ps2alerts:website-production-${{ github.sha }},maelstromeous/ps2alerts:website-production-latest
build-args: |
BUILD_SHA=${{ env.SHORT_SHA }}
BUILT=${{ env.NOW }}
VERSION=${{ steps.latesttag.outputs.tag }}