Skip to content

Commit

Permalink
Adding publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alterakey committed Nov 26, 2023
1 parent cb13c09 commit 3ce9f83
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: publish

on:
push:
tags:
- v*

env:
REGISTRY: ghcr.io

jobs:
deploy:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Setup environment
uses: actions/setup-python@v3
with:
python-version: 3.11

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64

- name: Login (docker hub)
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login (ghcr)
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: |
alterakey/trueseeing
ghcr.io/${{ github.repository }}
- name: Check out code
uses: actions/checkout@v3

- name: Building and pushing container
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64

0 comments on commit 3ce9f83

Please sign in to comment.