Skip to content

Commit 2d35e2d

Browse files
actions: Rewrite/cleanup and upgrade
1 parent a34a2ff commit 2d35e2d

2 files changed

Lines changed: 39 additions & 67 deletions

File tree

.github/workflows/docker-build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: docker-build
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ github.repository }}
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v6
21+
22+
- name: Log in to GitHub Container Registry
23+
if: github.event_name != 'pull_request'
24+
uses: docker/login-action@v4
25+
with:
26+
registry: ${{ env.REGISTRY }}
27+
username: ${{ github.actor }}
28+
password: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Set up Docker Buildx
31+
uses: docker/setup-buildx-action@v4
32+
33+
- name: Build and push Docker image
34+
uses: docker/build-push-action@v7
35+
with:
36+
context: .
37+
platforms: linux/amd64, linux/arm64
38+
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
39+
tags: ghcr.io/floatingmilkshake/mechanicalmilkshake:latest

.github/workflows/docker-publish.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)