Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Release GitHub Action - Removed Docker Hub access, now runs on change…
Browse files Browse the repository at this point in the history
…s to image
  • Loading branch information
DeanAyalon committed May 10, 2024
1 parent ab19cf1 commit 6bc9d18
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ on:
- main
- dev
- release/*
# paths:
# - dockerfile
paths:
- dockerfile
- files

jobs:
release:
Expand All @@ -16,11 +17,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_KEY }}
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USER }}
# password: ${{ secrets.DOCKERHUB_KEY }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -29,8 +30,10 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: VULNERABILITY??
run: echo ${{ secrets.DOCKERHUB_USER }}
# GitHub keeps secrets hidden from the console, printing '***' instead
## TODO: Could they still be accessed using http requests?
# - name: VULNERABILITY??
# run: echo ${{ secrets.DOCKERHUB_USER }}

# This script saves an environment variable TAG to GITHUB_OUTPUT
- name: Determine release tag from branch name
Expand All @@ -41,8 +44,8 @@ jobs:
env:
TAG: ${{ steps.release-tag.outputs.TAG }}
run: |
docker build . -t jackdeaniels/private:verdaccio-$TAG
docker tag jackdeaniels/private:verdaccio-$TAG ghcr.io/deanayalon/verdaccio:$TAG
docker build . -t ghcr.io/deanayalon/verdaccio:$TAG
# docker tag ghcr.io/deanayalon/verdaccio:$TAG jackdeaniels/private:verdaccio-$TAG

- name: List images
run: docker image ls
Expand All @@ -51,5 +54,5 @@ jobs:
env:
TAG: ${{ steps.release-tag.outputs.tag }}
run: |
docker push jackdeaniels/private:verdaccio-$TAG
docker push ghcr.io/deanayalon/verdaccio:$TAG
docker push ghcr.io/deanayalon/verdaccio:$TAG
# docker push jackdeaniels/private:verdaccio-$TAG

0 comments on commit 6bc9d18

Please sign in to comment.