Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Add Github Actions workflow to publish docker image #47

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
25 changes: 25 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Login to docker registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build container image
run: docker buildx build -t ghcr.io/${{ github.repository }}:latest -t ghcr.io/${{ github.repository }}:${GITHUB_SHA} .
- name: Push image (latest)
run: docker push ghcr.io/${{ github.repository }}:latest
- name: Push image
run: docker push ghcr.io/${{ github.repository }}:${GITHUB_SHA}