Skip to content

Commit

Permalink
Prefixed images with GHCR.io
Browse files Browse the repository at this point in the history
  • Loading branch information
lapplislazuli committed Mar 31, 2022
1 parent fcba51d commit 768464e
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ jobs:
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
ciselab/codebert-code2text
ciselab/codebert-codetotext-reproduction/codebert-code2text
images: |
ghcr.io/ciselab/codebert-code2text
ghcr.io/ciselab/codebert-codetotext-reproduction/codebert-code2text
# generate Docker tags based on the following events/attributes
tags: |
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

name: Publish Docker image

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/ciselab/codebert-code2text
ghcr.io/ciselab/codebert-codetotext-reproduction/codebert-code2text
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
-
name: Login to Github Package Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.CI_USER }}
password: ${{ secrets.CISELAB_CI_PAT }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 768464e

Please sign in to comment.