Skip to content

Commit

Permalink
Move to GHCR
Browse files Browse the repository at this point in the history
  • Loading branch information
marcwickenden committed Aug 8, 2022
1 parent 1de84d1 commit eb09691
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/docker.yml → .github/workflows/ghcr.yml
@@ -1,28 +1,25 @@
name: docker-hub-push
on:
# release:
# types:
# - published
push:
tags:
- '*'

env:
IMAGE_NAME: 4armed/kubeletmein
IMAGE_NAME: ghcr.io/4armed/kubeletmein

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Login to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Checkout code
uses: actions/checkout@v2
- name: Login to Docker Hub
run: echo ${{ secrets.DOCKER_BUILD_PASSWORD }} | docker login -u ${{ secrets.DOCKER_BUILD_USERNAME }} --password-stdin
- name: Get version
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})
- name: Build the tagged Docker image
run: docker build . -f build/Dockerfile --tag ${{ env.IMAGE_NAME }}:${{steps.vars.outputs.tag}}
- name: Build with Docker
run: docker build . -f build/Dockerfile --tag ${{ env.IMAGE_NAME }}:${{steps.vars.outputs.tag}} --label "org.opencontainers.image.source=${{github.server_url}}/${{github.repository}}"
- name: Push the tagged Docker image
run: docker push ${{ env.IMAGE_NAME }}:${{steps.vars.outputs.tag}}
- name: Tag image as latest
Expand Down

0 comments on commit eb09691

Please sign in to comment.