Skip to content

Commit 9ac8393

Browse files
Copilotkbuffardi
andauthored
Add multi-platform Docker build and publish workflow (#2)
* Add GitHub Actions workflow to build and publish multi-platform Docker image Agent-Logs-Url: https://github.com/ChicoState/cpp-container/sessions/361bd5c1-79c2-4252-97eb-551e24eb2785 Co-authored-by: kbuffardi <8324410+kbuffardi@users.noreply.github.com> * Update action versions --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kbuffardi <8324410+kbuffardi@users.noreply.github.com> Co-authored-by: Kevin Buffardi <kbuffardi@csuchico.edu>
1 parent f0cc663 commit 9ac8393

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build and Publish Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-push:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v6
17+
18+
- name: Set up QEMU
19+
uses: docker/setup-qemu-action@v4
20+
21+
- name: Set up Docker Buildx
22+
uses: docker/setup-buildx-action@v4
23+
24+
- name: Log in to Docker Hub
25+
uses: docker/login-action@v4
26+
with:
27+
username: ${{ secrets.DOCKERHUB_USERNAME }}
28+
password: ${{ secrets.DOCKERHUB_TOKEN }}
29+
30+
- name: Build and push
31+
uses: docker/build-push-action@v7
32+
with:
33+
context: .
34+
platforms: linux/amd64,linux/arm64
35+
push: true
36+
tags: kbuffardi/cpp-container:latest

0 commit comments

Comments
 (0)