diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml index cc971bc..fc6f8d3 100644 --- a/.github/workflows/actions.yaml +++ b/.github/workflows/actions.yaml @@ -4,11 +4,12 @@ on: env: CI_ACCESS_TOKEN: ${{ secrets.CI_ACCESS_TOKEN }} + GITHUB_REPOSITORY: ghcr.io/bridgeless-project/bridgeless-scan jobs: converge-github: - name: Skaffold Build To Github - runs-on: ubuntu-22.04 + name: Build To Github + runs-on: ubuntu-24.04 steps: - name: Checkout code uses: actions/checkout@v3 @@ -16,19 +17,24 @@ jobs: fetch-depth: 0 - name: Log in to registry - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin + # This is where you will update the personal access token to GITHUB_TOKEN + run: echo "${{ secrets.GITHUB_TOKEN }}" | buildah login ghcr.io -u $ --password-stdin - - name: Cache layers - uses: actions/cache@v3 - with: - path: "${{ github.workspace }}/.skaffold/cache" - key: skaffold-${{ hashFiles('**/cache') }} - restore-keys: | - skaffold- + - name: Build and Push Image + env: + IMAGE: ${{ env.GITHUB_REPOSITORY }}:${{ github.sha }} + CACHE_REPO: ${{ env.GITHUB_REPOSITORY }}/cache + run: | + buildah build \ + -f Dockerfile \ + --layers \ + --cache-from $CACHE_REPO \ + --cache-to $CACHE_REPO \ + -t $IMAGE \ + --build-arg CI_ACCESS_TOKEN=$CI_ACCESS_TOKEN \ + . - - name: Run Skaffold pipeline as command - uses: hiberbee/github-action-skaffold@latest - id: build - with: - command: build --tag ${{ github.sha }} - repository: ghcr.io/${{ github.repository_owner }} \ No newline at end of file + - name: Push Image + env: + IMAGE: ${{ env.GITHUB_REPOSITORY }}:${{ github.sha }} + run: buildah push $IMAGE \ No newline at end of file diff --git a/.github/workflows/actions_mainnet.yaml b/.github/workflows/actions_mainnet.yaml index f4df40b..ef4f991 100644 --- a/.github/workflows/actions_mainnet.yaml +++ b/.github/workflows/actions_mainnet.yaml @@ -6,11 +6,12 @@ on: env: CI_ACCESS_TOKEN: ${{ secrets.CI_ACCESS_TOKEN }} + GITHUB_REPOSITORY: ghcr.io/bridgeless-project/bridgeless-scan jobs: converge-github: - name: Skaffold Build To Github - runs-on: ubuntu-22.04 + name: Build To Github + runs-on: ubuntu-24.04 steps: - name: Checkout code uses: actions/checkout@v3 @@ -18,15 +19,28 @@ jobs: fetch-depth: 0 - name: Log in to registry - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin + # This is where you will update the personal access token to GITHUB_TOKEN + run: echo "${{ secrets.GITHUB_TOKEN }}" | buildah login ghcr.io -u $ --password-stdin - name: Create .env file run: | echo "${{ secrets.ENV_MAINNET }}" | base64 -d > .env - - name: Run Skaffold pipeline as command - uses: hiberbee/github-action-skaffold@latest - id: build - with: - command: build --tag ${{ github.sha }} - repository: ghcr.io/${{ github.repository_owner }} \ No newline at end of file + - name: Build and Push Image + env: + IMAGE: ${{ env.GITHUB_REPOSITORY }}:${{ github.sha }} + CACHE_REPO: ${{ env.GITHUB_REPOSITORY }}/cache + run: | + buildah build \ + -f Dockerfile \ + --layers \ + --cache-from $CACHE_REPO \ + --cache-to $CACHE_REPO \ + -t $IMAGE \ + --build-arg CI_ACCESS_TOKEN=$CI_ACCESS_TOKEN \ + . + + - name: Push Image + env: + IMAGE: ${{ env.GITHUB_REPOSITORY }}:${{ github.sha }} + run: buildah push $IMAGE \ No newline at end of file diff --git a/.github/workflows/actions_testnet.yaml b/.github/workflows/actions_testnet.yaml index f8d7f6c..39f3764 100644 --- a/.github/workflows/actions_testnet.yaml +++ b/.github/workflows/actions_testnet.yaml @@ -6,11 +6,12 @@ on: env: CI_ACCESS_TOKEN: ${{ secrets.CI_ACCESS_TOKEN }} + GITHUB_REPOSITORY: ghcr.io/bridgeless-project/bridgeless-scan jobs: converge-github: - name: Skaffold Build To Github - runs-on: ubuntu-22.04 + name: Build To Github + runs-on: ubuntu-24.04 steps: - name: Checkout code uses: actions/checkout@v3 @@ -18,15 +19,28 @@ jobs: fetch-depth: 0 - name: Log in to registry - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin + # This is where you will update the personal access token to GITHUB_TOKEN + run: echo "${{ secrets.GITHUB_TOKEN }}" | buildah login ghcr.io -u $ --password-stdin - name: Create .env file run: | echo "${{ secrets.ENV_TESTNET }}" | base64 -d > .env - - name: Run Skaffold pipeline as command - uses: hiberbee/github-action-skaffold@latest - id: build - with: - command: build --tag ${{ github.sha }} - repository: ghcr.io/${{ github.repository_owner }} \ No newline at end of file + - name: Build and Push Image + env: + IMAGE: ${{ env.GITHUB_REPOSITORY }}:${{ github.sha }} + CACHE_REPO: ${{ env.GITHUB_REPOSITORY }}/cache + run: | + buildah build \ + -f Dockerfile \ + --layers \ + --cache-from $CACHE_REPO \ + --cache-to $CACHE_REPO \ + -t $IMAGE \ + --build-arg CI_ACCESS_TOKEN=$CI_ACCESS_TOKEN \ + . + + - name: Push Image + env: + IMAGE: ${{ env.GITHUB_REPOSITORY }}:${{ github.sha }} + run: buildah push $IMAGE \ No newline at end of file diff --git a/.github/workflows/tag.yaml b/.github/workflows/tag.yaml index 1502a01..0fcbb63 100644 --- a/.github/workflows/tag.yaml +++ b/.github/workflows/tag.yaml @@ -7,11 +7,12 @@ on: env: CI_ACCESS_TOKEN: ${{ secrets.CI_ACCESS_TOKEN }} + GITHUB_REPOSITORY: ghcr.io/bridgeless-project/bridgeless-scan jobs: converge-github: name: Skaffold Build To Github - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout code uses: actions/checkout@v3 @@ -19,19 +20,24 @@ jobs: fetch-depth: 0 - name: Log in to registry - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin + # This is where you will update the personal access token to GITHUB_TOKEN + run: echo "${{ secrets.GITHUB_TOKEN }}" | buildah login ghcr.io -u $ --password-stdin - - name: Cache layers - uses: actions/cache@v3 - with: - path: "${{ github.workspace }}/.skaffold/cache" - key: skaffold-${{ hashFiles('**/cache') }} - restore-keys: | - skaffold- + - name: Build and Push Image + env: + IMAGE: ${{ env.GITHUB_REPOSITORY }}:${{ github.ref_name }} + CACHE_REPO: ${{ env.GITHUB_REPOSITORY }}/cache + run: | + buildah build \ + -f Dockerfile \ + --layers \ + --cache-from $CACHE_REPO \ + --cache-to $CACHE_REPO \ + -t $IMAGE \ + --build-arg CI_ACCESS_TOKEN=$CI_ACCESS_TOKEN \ + . - - name: Run Skaffold pipeline as command - uses: hiberbee/github-action-skaffold@latest - id: build - with: - command: build --tag ${{ github.ref_name }} - repository: ghcr.io/${{ github.repository_owner }} + - name: Push Image + env: + IMAGE: ${{ env.GITHUB_REPOSITORY }}:${{ github.ref_name }} + run: buildah push $IMAGE