Skip to content

Build & Push images #23

Build & Push images

Build & Push images #23

Workflow file for this run

name: Build & Push images
on:
workflow_dispatch:
workflow_call:
inputs:
image_tag:
required: true
type: string
# push:
# branches:
# - 'main'
jobs:
production-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
fetch-depth: 0
- name: Checkout - set env
run: echo "IMAGE_TAG=$(make version)" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push release version
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
if: ${{ github.event_name != 'pull_request' && github.event_name != 'workflow_call' }}
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0

Check failure on line 34 in .github/workflows/docker.yml

View workflow run for this annotation

GitHub Actions / Build & Push images

Invalid workflow file

The workflow is not valid. .github/workflows/docker.yml (Line: 34, Col: 9): 'uses' is already defined

Check failure on line 34 in .github/workflows/docker.yml

View workflow run for this annotation

GitHub Actions / Build & Push images

Invalid workflow file

The workflow is not valid. .github/workflows/docker.yml (Line: 34, Col: 9): 'uses' is already defined
with:
context: .
file: production.dockerfile
push: true
tags: |
${{ vars.DOCKERHUB_SK8L_UI_IMAGE_NAME }}:latest
${{ vars.DOCKERHUB_SK8L_UI_IMAGE_NAME }}:${{ env.IMAGE_TAG }}
sk8l-ui-dev-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
fetch-depth: 0
submodules: recursive
- name: Checkout - set env
run: echo "IMAGE_TAG=$(make version)" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push dev version
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
if: ${{ github.event_name == 'workflow_call' && inputs.image_tag || github.event_name == 'workflow_dispatch' }}
with:
context: .
file: Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
tags: |
${{ vars.DOCKERHUB_SK8L_UI_IMAGE_NAME }}:latest