Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,45 @@
name: build

env:
IMAGE_TAG: "1.0"

on:
merge_group:
pull_request:
push:
branches:
- main
workflow_dispatch:

jobs:
docker:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
push: false
tags: ghcr.io/${{ github.repository_owner }}/hpcdata:${{ env.IMAGE_TAG }}
cache-to: type=gha,mode=max
- name: Login to GHCR
if: github.repository == 'finkandreas/hpcdata' && github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
- name: Push Docker image
if: github.repository == 'finkandreas/hpcdata' && github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
push: true
tags: ghcr.io/${{ github.repository_owner }}/hpcdata:1.0
tags: ghcr.io/${{ github.repository_owner }}/hpcdata:${{ env.IMAGE_TAG }}
cache-from: type=gha
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/ubuntu:24.04 as builder
FROM docker.io/ubuntu:24.04 AS builder

ARG GOLANG_VERSION=1.24

Expand Down
Loading