chore: promote stage to main #3
@@ -0,0 +1,59 @@
|
||||
name: Build & Push Gitea image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- feat/workflow-step-events
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-push:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Authenticate to GCP
|
||||
uses: google-github-actions/auth@v2
|
||||
with:
|
||||
credentials_json: ${{ secrets.GCP_SA_KEY }}
|
||||
|
||||
- name: Set up gcloud
|
||||
uses: google-github-actions/setup-gcloud@v2
|
||||
with:
|
||||
project_id: neuron-785695
|
||||
|
||||
- name: Configure Docker for Artifact Registry
|
||||
run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet
|
||||
|
||||
- name: Set image tag
|
||||
id: tag
|
||||
run: |
|
||||
SHA="${GITHUB_SHA:0:8}"
|
||||
echo "tag=us-central1-docker.pkg.dev/neuron-785695/neuron-ci/gitea:${SHA}" >> "$GITHUB_OUTPUT"
|
||||
echo "latest=us-central1-docker.pkg.dev/neuron-785695/neuron-ci/gitea:latest" >> "$GITHUB_OUTPUT"
|
||||
echo "SHA=${SHA}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build Gitea image
|
||||
run: |
|
||||
docker build \
|
||||
--build-arg GITEA_VERSION="neuron-$(git rev-parse --short HEAD)" \
|
||||
--build-arg TAGS="sqlite sqlite_unlock_notify" \
|
||||
-t "${{ steps.tag.outputs.tag }}" \
|
||||
-t "${{ steps.tag.outputs.latest }}" \
|
||||
.
|
||||
|
||||
- name: Push Gitea image
|
||||
run: |
|
||||
docker push "${{ steps.tag.outputs.tag }}"
|
||||
docker push "${{ steps.tag.outputs.latest }}"
|
||||
echo "Pushed gitea:${{ steps.tag.outputs.SHA }} and :latest"
|
||||
|
||||
- name: Output image tag
|
||||
run: |
|
||||
echo "::notice title=Image pushed::${{ steps.tag.outputs.tag }}"
|
||||
echo "Update deployment.yaml image to: ${{ steps.tag.outputs.tag }}"
|
||||
@@ -405,15 +405,7 @@ func ToActionWorkflowJob(ctx context.Context, repo *repo_model.Repository, task
|
||||
runnerName = runner.Name
|
||||
}
|
||||
for i, step := range task.Steps {
|
||||
stepStatus, stepConclusion := ToActionsStatus(job.Status)
|
||||
steps = append(steps, &api.ActionWorkflowStep{
|
||||
Name: step.Name,
|
||||
Number: int64(i),
|
||||
Status: stepStatus,
|
||||
Conclusion: stepConclusion,
|
||||
StartedAt: step.Started.AsTime().UTC(),
|
||||
CompletedAt: step.Stopped.AsTime().UTC(),
|
||||
})
|
||||
steps = append(steps, ToActionWorkflowStep(step, i))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user