Skip to content

Commit

Permalink
release v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bullet-ant committed Sep 15, 2024
1 parent efdb17d commit 8757a30
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,41 +32,41 @@ jobs:
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV
echo "Version on 'app' branch: $APP_VERSION"
# Step 4: Checkout the 'main' branch code
- name: Checkout main branch code
uses: actions/checkout@v4
with:
ref: main

# Step 5: Get version from 'main' branch
- name: Get version from main branch
id: main_version
run: |
MAIN_VERSION=$(cat app/package.json | jq -r .version)
echo "MAIN_VERSION=$MAIN_VERSION" >> $GITHUB_ENV
echo "Version on 'main' branch: $MAIN_VERSION"
# Step 6: Set up Docker in the workflow
# Step 4: Set up Docker in the workflow
- name: Set up Docker
uses: docker/setup-buildx-action@v3

# Step 7: Log in to Docker Hub using secrets (Optional)
# Step 5: Log in to Docker Hub using secrets
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}

# Step 8: Build Docker image with version tag (Optional)
# Step 6: Build Docker image with version tag
- name: Build Docker image
run: |
docker build -t ${{ secrets.DOCKER_USER }}/gitops-app:${{ env.APP_VERSION }} app/.
# Step 9: Push Docker image to Docker Hub (Optional)
# Step 7: Push Docker image to Docker Hub
- name: Push Docker image
run: |
docker push ${{ secrets.DOCKER_USER }}/gitops-app:${{ env.APP_VERSION }}
# Step 8: Checkout the 'main' branch code
- name: Checkout main branch code
uses: actions/checkout@v4
with:
ref: main

# Step 9: Get version from 'main' branch
- name: Get version from main branch
id: main_version
run: |
MAIN_VERSION=$(cat app/package.json | jq -r .version)
echo "MAIN_VERSION=$MAIN_VERSION" >> $GITHUB_ENV
echo "Version on 'main' branch: $MAIN_VERSION"
# Step 10: Compare versions between 'app' and 'main' branches
- name: Compare versions
id: version_check
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "app",
"private": true,
"version": "1.0.0",
"version": "1.0.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion app/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</script>

<main>
<img {src} alt="a meme" />
<img {src} alt="a legendary meme" />
<h1>v1.0.0</h1>
</main>

Expand Down

0 comments on commit 8757a30

Please sign in to comment.