Skip to content

Bumped version

Bumped version #625

---
name: Build & Deploy Staging
on:
push:
branches: [staging]
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 staging image
uses: docker/build-push-action@v3
with:
file: provisioning/staging/Dockerfile
platforms: linux/amd64
push: true
tags: maelstromeous/ps2alerts:website-staging-${{ github.sha }},maelstromeous/ps2alerts:website-staging-latest
build-args: |
BUILD_SHA=${{ env.SHORT_SHA }}
BUILT=${{ env.NOW }}
VERSION=${{ steps.latesttag.outputs.tag }}