Skip to content

Commit

Permalink
Add Github registry support
Browse files Browse the repository at this point in the history
  • Loading branch information
igorjs committed Dec 4, 2023
1 parent dcacf68 commit eab002e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,47 +31,54 @@ jobs:
ref: 'main'
fetch-depth: 0

- name: Get Node Version
id: node
run: |
version="${{ matrix.version }}"
echo "Node Version $version"
if [[ "$version" == "lts" ]]; then
echo "latest=true" >> "$GITHUB_OUTPUT"
else
echo "latest=false" >> "$GITHUB_OUTPUT"
fi
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ github.repository_owner }}/node
# ghcr.io/${{ github.repository_owner }}/node
ghcr.io/${{ github.repository_owner }}/node
# public.ecr.aws/${{ github.repository_owner }}/node
labels: |
org.opencontainers.image.authors=${{ github.repository_owner }}
tags: |
type=raw,value=${{ matrix.version }}-alpine
flavor: |
latest=false
latest=${{ steps.node.outputs.latest }}
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
install: true
driver-opts: image=moby/buildkit:master

- name: Login to DockerHub
id: login-dockerhub
uses: docker/login-action@v3
with:
logout: false
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# # username: ${{ github.repository_owner }}
# username: ${{ github.actor }}
# password: ${{ github.token }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

# - name: Login to Public ECR
# uses: docker/login-action@v3
Expand All @@ -83,7 +90,6 @@ jobs:
# AWS_REGION: us-east-1

- name: Build and push Docker images
id: build-and-push
uses: docker/build-push-action@v5
continue-on-error: true
with:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.

0 comments on commit eab002e

Please sign in to comment.