Skip to content

soaska is building new image 🚀 #10

soaska is building new image 🚀

soaska is building new image 🚀 #10

Workflow file for this run

name: Actions Build Docker Image
run-name: ${{ github.actor }} is building new image 🚀
on: [push]
jobs:
Explore-github-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- name: Install Node.js
run: |
sudo apt install -y nodejs
- name: Check out repository code
uses: actions/checkout@v3
- name: List files in the repository
run: |
sudo ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
- name: Install Docker
run: |
sudo apt install -y docker
- name: Start Docker service
run: |
sudo dockerd &
sleep 5
sudo docker info
- name: Build Dockerfile
run: |
sudo docker build -t sd_telegram .
- name: "Login to Docker Hub"
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{secrets.USERNAME}}
password: ${{secrets.PASSWORD}}
- name: Upload Docker image to ghcr.io
run: |
package_name=$(basename ${{ github.repository }})
commit_date=$(git log -1 --format=%cd --date=format:'%Y%m%d%H%M%S')
#sudo docker tag sd_telegram ghcr.io/${{secrets.USERNAME}}/$package_name:$commit_date
sudo docker tag sd_telegram ghcr.io/${{secrets.USERNAME}}/$package_name:beta
# sudo docker push ghcr.io/${{secrets.USERNAME}}/$package_name:$commit_date
sudo docker push ghcr.io/${{secrets.USERNAME}}/$package_name:beta