Skip to content

Migrating GITHUB_ORG to an environment variable #23

Migrating GITHUB_ORG to an environment variable

Migrating GITHUB_ORG to an environment variable #23

Workflow file for this run

name: Publish image
on:
push:
branches:
- main
jobs:
publish-image:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- name: Build image
run: |
docker build -f Dockerfile . -t gdbuddy:latest
- name: Log in to container registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Publish image
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/gdbuddy
docker tag gdbuddy:latest $IMAGE_ID:latest
docker push $IMAGE_ID:latest