Skip to content

유저 이름을 parameter로 받도록 변경 #8

유저 이름을 parameter로 받도록 변경

유저 이름을 parameter로 받도록 변경 #8

Workflow file for this run

name: Build and Push Docker Image
on:
push:
jobs:
build-and-push-image:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: |
zarathucorp/devenv-docker
- name: Set TAG env
run: echo "RELEASE_VERSION=v$(date +'%Y%m%d')" >> $GITHUB_ENV
- name: Metadata
run: echo "container tag will be 'latest' and '${{ env.RELEASE_VERSION }}'"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub/
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
file: dockerfile
push: true
tags: |
dao0312/zarathu-dev:latest
dao0312/zarathu_dev:${{ env.RELEASE_VERSION }}
ghcr.io/${{ github.repository_owner }}/devenv:latest
ghcr.io/${{ github.repository_owner }}/devenv:${{ env.RELEASE_VERSION }}