Skip to content

Rebuild container with updated Ubuntu and J-Link. +semver:patch #56

Rebuild container with updated Ubuntu and J-Link. +semver:patch

Rebuild container with updated Ubuntu and J-Link. +semver:patch #56

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches: [main]
pull_request:
types: [
opened,
synchronize,
reopened,
]
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/main' && github.sha || ''}}
cancel-in-progress: true
env:
DOCKER_IMAGE_NAME: ghcr.io/staflsystems/stafl-devcontainer-ci
jobs:
build_and_push:
name: Build and Push Docker Image
runs-on: ubuntu-medium
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Determine Version
if: github.ref == 'refs/heads/main'
id: staflversion
uses: StaflSystems/CustomGithubActions/DetermineVersion@main
- name: Display Version
if: github.ref == 'refs/heads/main'
run: |
echo "Version: ${{steps.staflversion.outputs.full}}"
- name: Build Docker image
if: github.ref != 'refs/heads/main'
uses: docker/build-push-action@v5
with:
context: ${{ github.workspace }}/stafl-devcontainer
push: false
tags: ghcr.io/staflsystems/stafl-devcontainer-ci
platforms: linux/amd64,linux/arm64/v8
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and Push Docker image
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v5
with:
context: ${{ github.workspace }}/stafl-devcontainer
push: true
tags: |
${{ env.DOCKER_IMAGE_NAME }}:latest
${{ env.DOCKER_IMAGE_NAME }}:${{ steps.staflversion.outputs.major }}.${{ steps.staflversion.outputs.minor }}.${{ steps.staflversion.outputs.patch }}-${{ steps.staflversion.outputs.build }}
platforms: linux/amd64,linux/arm64/v8
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Create a GitHub release (main)
if: github.ref == 'refs/heads/main'
uses: StaflSystems/release-action@main
with:
tag: ${{ steps.staflversion.outputs.full }}
commit: ${{ github.sha }}