/[sudobot]/trunk/.github/workflows/docker.yml
ViewVC logotype

Annotation of /trunk/.github/workflows/docker.yml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 575 - (hide annotations)
Mon Jul 29 17:59:26 2024 UTC (8 months ago) by rakinar2
File size: 893 byte(s)
chore: add trunk
1 rakinar2 575 name: Docker
2    
3     on: [push, pull_request]
4    
5     jobs:
6     build:
7     runs-on: ubuntu-latest
8    
9     steps:
10     - uses: actions/checkout@v3
11    
12     - name: Prepare environment
13     run: echo "DEBUG=1" > .env.docker
14    
15     - name: Set Tag
16     run: echo "$(date +%s)" > TAG
17    
18     - name: Build the Docker image
19     run: docker build . --file Dockerfile --tag ghcr.io/onesoft-sudo/sudobot:$(cat TAG) --tag ghcr.io/onesoft-sudo/sudobot:latest
20    
21     - name: Login to GitHub Container Registry
22     run: echo ${{ secrets.PAT_TOKEN }} | docker login ghcr.io -u virtual-designer --password-stdin
23     if: github.event_name == 'push' && github.ref == 'refs/heads/main'
24    
25     - name: Push the Docker image
26     run: docker push ghcr.io/onesoft-sudo/sudobot:$(cat TAG) && docker push ghcr.io/onesoft-sudo/sudobot:latest
27     if: github.event_name == 'push' && github.ref == 'refs/heads/main'

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26