Skip to content

Commit

Permalink
ci: switch from docker.io to ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
justinrubek committed Feb 27, 2024
1 parent 98d2a49 commit 5b4bd02
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
jobs:
publish-container:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3

Expand All @@ -35,13 +38,13 @@ jobs:

- name: login to registry
env:
USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
PASSWORD: ${{ secrets.DOCKER_HUB_TOKEN }}
run: echo ${PASSWORD} | nix develop .#ci -c skopeo login docker.io -u ${USERNAME} --password-stdin
USERNAME: ${{ github.actor }}
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: echo ${PASSWORD} | nix develop .#ci -c skopeo login ghcr.io -u ${USERNAME} --password-stdin

- name: push to registry
env:
REPO_OWNER: justinrubek
REPO_NAME: ${{ inputs.repository_name }}
VERSION: ${{ github.sha }}
run: nix develop .#ci -c skopeo copy docker-archive:result docker://${REPO_OWNER}/${REPO_NAME}:${VERSION} --insecure-policy
run: nix develop .#ci -c skopeo copy docker-archive:result docker://ghcr.io/${REPO_OWNER}/${REPO_NAME}:${VERSION} --insecure-policy

0 comments on commit 5b4bd02

Please sign in to comment.