Skip to content

Commit 2b402c7

Browse files
committed
chore: Update ci.yml
1 parent 961e872 commit 2b402c7

1 file changed

Lines changed: 43 additions & 38 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 43 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ jobs:
99
name: Build
1010
runs-on: ubuntu-latest
1111
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
12+
permissions:
13+
packages: write
14+
contents: read
15+
attestations: write
16+
id-token: write
1217
steps:
1318
- name: Checkout repo
1419
uses: actions/checkout@v4
@@ -24,28 +29,28 @@ jobs:
2429
restore-keys: |
2530
${{ runner.os }}-buildx-
2631
27-
- name: Fly registry auth
32+
- name: GHCR registry auth
2833
uses: docker/login@v3
2934
with:
30-
registry: registry.fly.io
31-
username: x
32-
password: ${{ secrets.FLY_API_TOKEN }}
35+
registry: ghcr.io
36+
username: ${{ github.actor }}
37+
password: ${{ secrets.GITHUB_TOKEN }}
3338

34-
- name: Build and push to Fly
39+
- name: Build and push Docker image
3540
uses: docker/build-push-action@v6
3641
with:
3742
context: .
3843
push: true
39-
tags: registry.fly.io/octo:${{ github.sha }}
44+
tags: ghcr.io/octocondev/octocon:latest
4045
build-args: |
4146
COMMIT_SHA=${{ github.sha }}
4247
cache-from: type=local,src=/tmp/.buildx-cache
4348
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
4449

4550
- name: Save Docker image as tarball
4651
run: |
47-
docker pull registry.fly.io/octo:${{ github.sha }}
48-
docker save registry.fly.io/octo:${{ github.sha }} -o /tmp/image.tar
52+
docker pull ghcr.io/octocondev/octocon:${{ github.sha }}
53+
docker save ghcr.io/octocondev/octocon:${{ github.sha }} -o /tmp/image.tar
4954
5055
- name: Upload image artifact
5156
uses: actions/upload-artifact@v4
@@ -63,39 +68,39 @@ jobs:
6368
rm -rf /tmp/.buildx-cache
6469
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
6570
66-
fly_deploy:
67-
name: Fly Deploy
68-
runs-on: ubuntu-latest
69-
needs: [build]
70-
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
71+
# fly_deploy:
72+
# name: Fly Deploy
73+
# runs-on: ubuntu-latest
74+
# needs: [build]
75+
# if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
7176

72-
steps:
73-
- name: Checkout repo
74-
uses: actions/checkout@v2
77+
# steps:
78+
# - name: Checkout repo
79+
# uses: actions/checkout@v2
7580

76-
- name: Deploy to Fly
77-
uses: superfly/flyctl-actions@v1.5
78-
with:
79-
args:
80-
'deploy -i registry.fly.io/octo:${{ github.sha }}'
81-
env:
82-
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
81+
# - name: Deploy to Fly
82+
# uses: superfly/flyctl-actions@v1.5
83+
# with:
84+
# args:
85+
# 'deploy -i registry.fly.io/octo:${{ github.sha }}'
86+
# env:
87+
# FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
8388

84-
dedi_deploy:
85-
name: Dedi Deploy
86-
runs-on: ubuntu-latest
87-
needs: [build]
88-
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
89+
# dedi_deploy:
90+
# name: Dedi Deploy
91+
# runs-on: ubuntu-latest
92+
# needs: [build]
93+
# if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
8994

90-
steps:
91-
- name: Checkout repo
92-
uses: actions/checkout@v2
95+
# steps:
96+
# - name: Checkout repo
97+
# uses: actions/checkout@v2
9398

94-
- name: Download image
95-
uses: actions/download-artifact@v4
96-
with:
97-
name: image
98-
path: /tmp
99+
# - name: Download image
100+
# uses: actions/download-artifact@v4
101+
# with:
102+
# name: image
103+
# path: /tmp
99104

100-
- name: 'Load image'
101-
run: docker load --input /tmp/image.tar
105+
# - name: 'Load image'
106+
# run: docker load --input /tmp/image.tar

0 commit comments

Comments
 (0)