Create CKAN Mod Installer Github Action #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Mod Installer | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
repository_dispatch: | |
types: | |
- deploy | |
jobs: | |
deploy: | |
name: Build and deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Docker | |
run: | | |
curl -fsSL https://get.docker.com -o get-docker.sh | |
sh get-docker.sh | |
- name: Build Docker image | |
env: | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | |
if: ${{ env.DOCKERHUB_USERNAME && env.DOCKERHUB_PASSWORD }} | |
run: | | |
echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin | |
docker build -t kspckan/mod-installer . | |
docker tag kspckan/mod-installer kspckan/mod-installer:latest | |
docker push kspckan/mod-installer:latest |